]> granicus.if.org Git - php/commitdiff
- Remove redundant IS_SLASH
authorAndi Gutmans <andi@php.net>
Thu, 31 Aug 2000 19:49:36 +0000 (19:49 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 31 Aug 2000 19:49:36 +0000 (19:49 +0000)
- Reverse config.w32.h patches
- Use IS_ABSOLUTE_PATH() in one place in fopen-wrappers.c

ext/standard/dl.c
main/config.w32.h
main/fopen_wrappers.c

index c24d2ef3fc65f5a7c54daf55e42c0af4bee2c421..e2b37ff2e24b8dc6ab092d99bd12ca3290b5a290 100644 (file)
@@ -87,9 +87,6 @@ PHP_FUNCTION(dl)
 #define USING_ZTS 0
 #endif
 
-#define IS_SLASH(c)    \
-       (((c)=='/') || ((c)=='\\'))
-
 void php_dl(pval *file, int type, pval *return_value)
 {
        void *handle;
index 8deca6ce997bc4a468a6fabad1dbcb9c0b14a49a..d23e88e4cd364eb49815994c1f5e69d09db6e5d5 100644 (file)
 #if !defined(COMPILE_DL)
 #define HAVE_SNMP 0
 # define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/
-#define DBASE 1
+#define DBASE 0
 #define NDBM 0
 #define GDBM 0
 #define BSD2 0
 #define HAVE_CRYPT 0
-#define HAVE_ORACLE 1
+#define HAVE_ORACLE 0
 #undef HAVE_ADABAS
 #undef HAVE_SOLID
 #ifndef COMPILE_DL_MSQL
 #define HAVE_MSQL 0
 #endif
-#define HAVE_SYBASE 1
-#define HAVE_LIBGD 1
+#define HAVE_SYBASE 0
+#define HAVE_LIBGD 0
 #define HAVE_FILEPRO 0
 #endif
 /* ----------------------------------------------------------------
index 0eb01397ee301c7393864b8bd61aeb7a6e55e4e7..638c771c9bc698f0eafb4afd12375ed02e41eb07 100644 (file)
@@ -328,12 +328,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
 #endif
        if (PG(doc_root) && path_info) {
                length = strlen(PG(doc_root));
-#ifdef PHP_WIN32
-               /* Check for absolute path. This should really use virtual cwd macros */
-               if (IS_SLASH(*PG(doc_root)) || (length >= 3 && PG(doc_root)[1] == ':' && IS_SLASH(PG(doc_root)[2]))) {
-#else
-               if (IS_SLASH(*PG(doc_root))) {
-#endif
+               if (IS_ABSOLUTE_PATH(PG(doc_root), length)) {
                        filename = emalloc(length + strlen(path_info) + 2);
                        if (filename) {
                                memcpy(filename, PG(doc_root), length);