From e8e5c9d97e54cf3d86d88afc0f2b3877841c4ad0 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Thu, 31 Aug 2000 19:49:36 +0000 Subject: [PATCH] - Remove redundant IS_SLASH - Reverse config.w32.h patches - Use IS_ABSOLUTE_PATH() in one place in fopen-wrappers.c --- ext/standard/dl.c | 3 --- main/config.w32.h | 8 ++++---- main/fopen_wrappers.c | 7 +------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/ext/standard/dl.c b/ext/standard/dl.c index c24d2ef3fc..e2b37ff2e2 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -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; diff --git a/main/config.w32.h b/main/config.w32.h index 8deca6ce99..d23e88e4cd 100644 --- a/main/config.w32.h +++ b/main/config.w32.h @@ -58,19 +58,19 @@ #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 /* ---------------------------------------------------------------- diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 0eb01397ee..638c771c9b 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -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); -- 2.40.0