#ifdef TSRM_WIN32
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
-#define DEFAULT_SLASH '\\'
#define TOKENIZER_STRING "/\\"
-
-#define COPY_WHEN_ABSOLUTE 2
static int php_check_dots(const char *element, int n)
{
#else
-#define DEFAULT_SLASH '/'
#define TOKENIZER_STRING "/"
#endif
(len == 1 && ptr[0] == '.')
#endif
-#ifndef COPY_WHEN_ABSOLUTE
-#define COPY_WHEN_ABSOLUTE 0
-#endif
-
/* define this to check semantics */
#define IS_DIR_OK(s) (1)
/* mode_t isn't defined on Windows */
typedef int mode_t;
+#define DEFAULT_SLASH '\\'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
-
+#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
#include <dirent.h>
#endif
+#define DEFAULT_SLASH '/'
#define IS_SLASH(c) ((c) == '/')
#endif
+
+#ifndef COPY_WHEN_ABSOLUTE
+#define COPY_WHEN_ABSOLUTE 0
+#endif
+
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))