Browse Source

- chroot does not work on windows

PHP-4.0.5
Derick Rethans 26 years ago
parent
commit
8cef8a9ca1
  1. 2
      ext/standard/basic_functions.c
  2. 4
      ext/standard/dir.c
  3. 2
      ext/standard/php_dir.h

2
ext/standard/basic_functions.c

@ -465,7 +465,9 @@ function_entry basic_functions[] = {
PHP_FE(opendir, NULL) PHP_FE(opendir, NULL)
PHP_FE(closedir, NULL) PHP_FE(closedir, NULL)
PHP_FE(chdir, NULL) PHP_FE(chdir, NULL)
#if !defined(ZEND_WIN32)&&!defined(ZTS)
PHP_FE(chroot, NULL) PHP_FE(chroot, NULL)
#endif
PHP_FE(getcwd, NULL) PHP_FE(getcwd, NULL)
PHP_FE(rewinddir, NULL) PHP_FE(rewinddir, NULL)
PHP_STATIC_FE("readdir", php_if_readdir, NULL) PHP_STATIC_FE("readdir", php_if_readdir, NULL)

4
ext/standard/dir.c

@ -222,6 +222,8 @@ PHP_FUNCTION(closedir)
} }
/* }}} */ /* }}} */
#if !defined(ZEND_WIN32)&&!defined(ZTS)
/* {{{ proto int chroot(string directory) /* {{{ proto int chroot(string directory)
Change root directory */ Change root directory */
@ -253,6 +255,8 @@ PHP_FUNCTION(chroot)
} }
/* }}} */ /* }}} */
#endif
/* {{{ proto int chdir(string directory) /* {{{ proto int chdir(string directory)
Change the current directory */ Change the current directory */

2
ext/standard/php_dir.h

@ -28,7 +28,9 @@ PHP_RINIT_FUNCTION(dir);
PHP_FUNCTION(opendir); PHP_FUNCTION(opendir);
PHP_FUNCTION(closedir); PHP_FUNCTION(closedir);
PHP_FUNCTION(chdir); PHP_FUNCTION(chdir);
#if !defined(ZEND_WIN32)&&!defined(ZTS)
PHP_FUNCTION(chroot); PHP_FUNCTION(chroot);
#endif
PHP_FUNCTION(getcwd); PHP_FUNCTION(getcwd);
PHP_FUNCTION(rewinddir); PHP_FUNCTION(rewinddir);
PHP_NAMED_FUNCTION(php_if_readdir); PHP_NAMED_FUNCTION(php_if_readdir);

Loading…
Cancel
Save