From 857e1a6b3062ac01c204c165f788c3cb443382e9 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Thu, 14 Nov 2002 22:51:21 +0000 Subject: [PATCH] MFH --- ext/standard/dir.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 0ef2cf6348..d0e8c042b5 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -119,7 +119,7 @@ PHP_RINIT_FUNCTION(dir) PHP_MINIT_FUNCTION(dir) { - static char tmpstr[2]; + static char dirsep_str[2], pathsep_str[2]; zend_class_entry dir_class_entry; INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions); @@ -128,9 +128,12 @@ PHP_MINIT_FUNCTION(dir) #ifdef ZTS ts_allocate_id(&dir_globals_id, sizeof(php_dir_globals), NULL, NULL); #endif - tmpstr[0] = DEFAULT_SLASH; - tmpstr[1] = '\0'; - REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_CS|CONST_PERSISTENT); + dirsep_str[0] = DEFAULT_SLASH; + dirsep_str[1] = '\0'; + REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", dirsep_str, CONST_CS|CONST_PERSISTENT); + pathsep_str[0] = ZEND_PATHS_SEPARATOR; + pathsep_str[1] = '\0'; + REGISTER_STRING_CONSTANT("PATH_SEPARATOR", pathsep_str, CONST_CS|CONST_PERSISTENT); #ifdef HAVE_GLOB #ifdef GLOB_BRACE -- 2.40.0