hyanantha Fri Oct 8 05:48:23 2004 EDT
Modified files:
/TSRM tsrm_virtual_cwd.h
Log:
removed redundant CLIB_STAT_PATCH checks. defined the IS_ABSOLUTE_PATH macros to suit the NetWare filesystem convention
http://cvs.php.net/diff.php/TSRM/tsrm_virtual_cwd.h?r1=1.43&r2=1.44&ty=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.43 TSRM/tsrm_virtual_cwd.h:1.44
--- TSRM/tsrm_virtual_cwd.h:1.43 Mon Oct 4 20:42:25 2004
+++ TSRM/tsrm_virtual_cwd.h Fri Oct 8 05:48:20 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.h,v 1.43 2004/10/05 00:42:25 andi Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.44 2004/10/08 09:48:20 hyanantha Exp $ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
@@ -70,14 +70,15 @@
#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 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