summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2003-09-30 09:48:53 (GMT)
committerStanislav Malyshev <stas@php.net>2003-09-30 09:48:53 (GMT)
commit1a773f17d35626c95b3ec1b2c16050241e71ef2f (patch)
treecb84e3da155537c31b8f40e1e89151a94db0a786 /TSRM
parente898d7c25a971d9a64e624b9b73e33ce383b2b8e (diff)
downloadphp-1a773f17d35626c95b3ec1b2c16050241e71ef2f.tar.gz
MF4: add realpath function for win32
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_win32.c9
-rw-r--r--TSRM/tsrm_win32.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index a8a8274..1095787 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -374,4 +374,13 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
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
diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h
index 303e105..ffed2d5 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -102,4 +102,5 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
-#endif \ No newline at end of file
+TSRM_API char *realpath(char *orig_path, char *buffer);
+#endif