diff options
| author | Stig Bakken <ssb@php.net> | 2001-04-08 21:57:13 +0000 |
|---|---|---|
| committer | Stig Bakken <ssb@php.net> | 2001-04-08 21:57:13 +0000 |
| commit | 368c6bf00371ebfdf9fd3c9d58a4fb78a7221f09 (patch) | |
| tree | a0edf9779ce5b1395968ee730d67296003deb39f | |
| parent | 23f3187b6f48dce8166b93ef8d7709c823d969ab (diff) | |
| download | php-git-368c6bf00371ebfdf9fd3c9d58a4fb78a7221f09.tar.gz | |
@Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows) (Stig)
| -rw-r--r-- | ext/standard/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 52c8ef9800..65f3f7d553 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -128,6 +128,7 @@ PHP_RINIT_FUNCTION(dir) PHP_MINIT_FUNCTION(dir) { + static char tmpstr[2]; zend_class_entry dir_class_entry; le_dirp = zend_register_list_destructors_ex(_dir_dtor, NULL, "dir", module_number); @@ -138,6 +139,9 @@ PHP_MINIT_FUNCTION(dir) #ifdef ZTS dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), NULL, NULL); #endif + tmpstr[0] = DEFAULT_SLASH; + tmpstr[1] = '\0'; + REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0); return SUCCESS; } |
