summaryrefslogtreecommitdiff
path: root/main/php_realpath.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-02-10 17:14:05 +0000
committerAndi Gutmans <andi@php.net>2000-02-10 17:14:05 +0000
commitf452c7762f646d9b25862a03318e149d2bae828a (patch)
tree439203f5667b98876f57e6026449fa419ab0303a /main/php_realpath.c
parentbc5c9d8d7b0a32e6d716141c0ff2d7f5015c4658 (diff)
downloadphp-git-f452c7762f646d9b25862a03318e149d2bae828a.tar.gz
- Introduce PHP_WIN32
Diffstat (limited to 'main/php_realpath.c')
-rw-r--r--main/php_realpath.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/php_realpath.c b/main/php_realpath.c
index 8d0f1caccf..c6edfb0cca 100644
--- a/main/php_realpath.c
+++ b/main/php_realpath.c
@@ -40,7 +40,7 @@ char *php_realpath(char *path, char resolved_path []) {
char path_copy[MAXPATHLEN]; /* A work-copy of the path */
char *workpos; /* working position in *path */
-#if !(WIN32|WINNT)
+#if !(PHP_WIN32)
char buf[MAXPATHLEN]; /* Buffer for readlink */
int linklength; /* The result from readlink */
#endif
@@ -48,7 +48,7 @@ char *php_realpath(char *path, char resolved_path []) {
struct stat filestat; /* result from stat */
-#if WIN32|WINNT
+#if PHP_WIN32
char *temppos; /* position while counting '.' */
int dotcount; /* number of '.' */
int t; /* counter */
@@ -58,7 +58,7 @@ char *php_realpath(char *path, char resolved_path []) {
strcpy(path_copy, path);
workpos = path_copy;
-#if WIN32|WINNT
+#if PHP_WIN32
/* Find out where we start - Windows version */
if ((*workpos == '\\') || (*workpos == '/')) {
/* We start at the root of the current drive */
@@ -109,13 +109,13 @@ char *php_realpath(char *path, char resolved_path []) {
/* Go to the end, then stop */
while(*workpos != 0) {
/* Strip (back)slashes */
-#if WIN32|WINNT
+#if PHP_WIN32
while(*workpos == '\\') workpos++;
#else
while(*workpos == '/') workpos++;
#endif
-#if WIN32|WINNT
+#if PHP_WIN32
/* reset dotcount */
dotcount = 0;
@@ -169,7 +169,7 @@ char *php_realpath(char *path, char resolved_path []) {
*writepos++ = *workpos++;
}
*writepos = 0;
-#else /* WIN32|WINNT */
+#else /* PHP_WIN32 */
/* Look for .. */
if ((workpos[0] == '.') && (workpos[1] != 0)) {
if ((workpos[1] == '.') && ((workpos[2] == '/') || (workpos[2] == 0))) {
@@ -247,7 +247,7 @@ char *php_realpath(char *path, char resolved_path []) {
*writepos++ = *workpos++;
}
*writepos = 0;
-#endif /* WIN32|WINNT */
+#endif /* PHP_WIN32 */
}
/* Check if the resolved path is a directory */