1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

MF4: add realpath function for win32

This commit is contained in:
Stanislav Malyshev
2003-09-30 09:48:53 +00:00
parent e898d7c25a
commit 1a773f17d3
2 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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
TSRM_API char *realpath(char *orig_path, char *buffer);
#endif