From: Zeev Suraski Date: Mon, 16 Jul 2001 13:31:55 +0000 (+0000) Subject: Generalize X-Git-Tag: PRE_TSRM_MERGE_PATCH~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=407fd77c2097c7d1ca6b26b183a458e01dfb6722;p=php Generalize --- diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 229075e799..85d56fbb2b 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -215,11 +215,7 @@ PHPAPI int php_check_open_basedir(char *path) ptr = pathbuf; while (ptr && *ptr) { -#ifdef PHP_WIN32 - end = strchr(ptr, ';'); -#else - end = strchr(ptr, ':'); -#endif + end = strchr(ptr, DEFAULT_DIR_SEPARATOR); if (end != NULL) { *end = '\0'; end++; @@ -478,11 +474,7 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char ** pathbuf = (char *) emalloc(exec_fname_length + path_length +1 +1); memcpy(pathbuf, path, path_length); -#ifdef PHP_WIN32 - pathbuf[path_length] = ';'; -#else - pathbuf[path_length] = ':'; -#endif + pathbuf[path_length] = DEFAULT_DIR_SEPARATOR; memcpy(pathbuf+path_length+1, exec_fname, exec_fname_length); pathbuf[path_length + exec_fname_length +1] = '\0'; } else { @@ -492,11 +484,7 @@ PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char ** ptr = pathbuf; while (ptr && *ptr) { -#ifdef PHP_WIN32 - end = strchr(ptr, ';'); -#else - end = strchr(ptr, ':'); -#endif + end = strchr(ptr, DEFAULT_DIR_SEPARATOR); if (end != NULL) { *end = '\0'; end++;