]> granicus.if.org Git - php/commitdiff
Export IS_ABSOLUTE_PATH to the outside world.
authorSascha Schumann <sas@php.net>
Sun, 27 Aug 2000 19:36:35 +0000 (19:36 +0000)
committerSascha Schumann <sas@php.net>
Sun, 27 Aug 2000 19:36:35 +0000 (19:36 +0000)
main/php_virtual_cwd.c
main/php_virtual_cwd.h

index 6de1764033b4272322d5c724ddd6aa1a3fea9e7a..e9132ad194d5502d3c341bdaeeb2f8bae2256685 100644 (file)
@@ -26,7 +26,6 @@
 #include <limits.h>
 #include <errno.h>
 #include <stdlib.h>
-#include <ctype.h>
 #include <fcntl.h>
 
 #ifdef ZEND_WIN32
@@ -68,13 +67,9 @@ cwd_state main_cwd_state; /* True global */
 
 #ifdef ZEND_WIN32
 #define php_strtok_r(a,b,c) strtok((a),(b))
-#define IS_SLASH(c)    ((c) == '/' || (c) == '\\')
 #define DEFAULT_SLASH '\\'
 #define TOKENIZER_STRING "/\\"
 
-#define IS_ABSOLUTE_PATH(path, len) \
-       (len >= 2 && isalpha(path[0]) && path[1] == ':')
-
 #define COPY_WHEN_ABSOLUTE 2
        
 static int php_check_dots(const char *element, int n) 
@@ -92,7 +87,6 @@ static int php_check_dots(const char *element, int n)
 
 
 #else
-#define IS_SLASH(c)    ((c) == '/')
 #define DEFAULT_SLASH '/'
 #define TOKENIZER_STRING "/"
 #endif
@@ -100,11 +94,6 @@ static int php_check_dots(const char *element, int n)
 
 /* default macros */
 
-#ifndef IS_ABSOLUTE_PATH       
-#define IS_ABSOLUTE_PATH(path, len) \
-       (IS_SLASH(path[0]))
-#endif
-
 #ifndef IS_DIRECTORY_UP
 #define IS_DIRECTORY_UP(element, len) \
        (len == 2 && memcmp(element, "..", 2) == 0)
index 6b6606cc174fc75606c6a42ce177704eff82c090..03b100d8c2375a3bbc1d2bdbfc132bfb633dd224 100644 (file)
 #include <unistd.h>
 #endif
 
+#include <ctype.h>
+
 #ifdef ZEND_WIN32
 #include "win32/readdir.h"
+
+#define IS_SLASH(c)    ((c) == '/' || (c) == '\\')
+
+#define IS_ABSOLUTE_PATH(path, len) \
+       (len >= 2 && isalpha(path[0]) && path[1] == ':')
+
 #else
 #ifdef HAVE_DIRENT_H
 #include <dirent.h>
 #endif
+
+#define IS_SLASH(c)    ((c) == '/')
+
+#endif
+
+#ifndef IS_ABSOLUTE_PATH       
+#define IS_ABSOLUTE_PATH(path, len) \
+       (IS_SLASH(path[0]))
 #endif
 
 #if HAVE_UTIME