summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAnantha Kesari H Y <hyanantha@php.net>2004-10-08 09:48:20 +0000
committerAnantha Kesari H Y <hyanantha@php.net>2004-10-08 09:48:20 +0000
commitb140c803963c244e6ba3604b0d146c9490528be1 (patch)
treef7cd8efdd13e22ac5564bf36ba797d7ee203e80c /TSRM
parenta980f7babe199bce957605707e34f99a3a0cc4cf (diff)
downloadphp-git-b140c803963c244e6ba3604b0d146c9490528be1.tar.gz
removed redundant CLIB_STAT_PATCH checks. defined the IS_ABSOLUTE_PATH macros to suit the NetWare filesystem convention
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h
index 00daf0bb77..bc06a21c64 100644
--- a/TSRM/tsrm_virtual_cwd.h
+++ b/TSRM/tsrm_virtual_cwd.h
@@ -70,14 +70,15 @@ typedef unsigned short mode_t;
#include <dirent.h>
#endif
-#define DEFAULT_SLASH '/'
+#define DEFAULT_SLASH '\\'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define IS_SLASH_P(c) IS_SLASH(*(c))
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
+/* Colon indicates volume name, either first character should be forward slash or backward slash */
#define IS_ABSOLUTE_PATH(path, len) \
- (strchr(path, ':') != NULL) /* Colon indicates volume name */
+ ((strchr(path, ':') != NULL) || ((len >= 1) && ((path[0] == '/') || (path[0] == '\\'))))
#else
#ifdef HAVE_DIRENT_H
@@ -141,11 +142,7 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
-#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
-#else
-CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
-#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif