cvs: TSRM(PHP_4_3) / tsrm_win32.c tsrm_win32.h

From: Date: Mon, 29 Sep 2003 13:57:04 +0000
Subject: cvs: TSRM(PHP_4_3) / tsrm_win32.c tsrm_win32.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1865@lists.php.net to get a copy of this message
stas Mon Sep 29 09:57:04 2003 EDT Modified files: (Branch: PHP_4_3) /TSRM tsrm_win32.c tsrm_win32.h Log: add realpath for Win32 non-ZTS Index: TSRM/tsrm_win32.c diff -u TSRM/tsrm_win32.c:1.14.2.1 TSRM/tsrm_win32.c:1.14.2.2 --- TSRM/tsrm_win32.c:1.14.2.1 Tue Dec 31 11:23:06 2002 +++ TSRM/tsrm_win32.c Mon Sep 29 09:57:03 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.c,v 1.14.2.1 2002/12/31 16:23:06 sebastian Exp $ */ +/* $Id: tsrm_win32.c,v 1.14.2.2 2003/09/29 13:57:03 stas Exp $ */ #include <stdio.h> #include <fcntl.h> @@ -358,5 +358,14 @@ default: return -1; } +} + +TSRM_API char *realpath(char *orig_path, char *buffer) +{ + int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL); + if(!ret || ret > _MAX_PATH) { + return NULL; + } + return buffer; } #endif Index: TSRM/tsrm_win32.h diff -u TSRM/tsrm_win32.h:1.9.2.1 TSRM/tsrm_win32.h:1.9.2.2 --- TSRM/tsrm_win32.h:1.9.2.1 Tue Dec 31 11:23:07 2002 +++ TSRM/tsrm_win32.h Mon Sep 29 09:57:03 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_win32.h,v 1.9.2.1 2002/12/31 16:23:07 sebastian Exp $ */ +/* $Id: tsrm_win32.h,v 1.9.2.2 2003/09/29 13:57:03 stas Exp $ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H @@ -101,4 +101,5 @@ TSRM_API int shmdt(const void *shmaddr); TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf); +TSRM_API char *realpath(char *orig_path, char *buffer); #endif

« previous php.zend-engine.cvs (#1865) next »