mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
There might be more systems which do not support chroot, so we check
for the existence of it. Additionally, if chroot is not supported, the warn_not_available function is invoked now.
This commit is contained in:
parent
c239da7e66
commit
637e8e14aa
@ -358,6 +358,7 @@ dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(
|
||||
asctime_r \
|
||||
chroot \
|
||||
crypt \
|
||||
ctime_r \
|
||||
cuserid \
|
||||
|
@ -465,8 +465,10 @@ function_entry basic_functions[] = {
|
||||
PHP_FE(opendir, NULL)
|
||||
PHP_FE(closedir, NULL)
|
||||
PHP_FE(chdir, NULL)
|
||||
#if !defined(ZEND_WIN32)&&!defined(ZTS)
|
||||
#if defined(HAVE_CHROOT) && !defined(ZTS)
|
||||
PHP_FE(chroot, NULL)
|
||||
#else
|
||||
PHP_FALIAS(chroot, warn_not_available, NULL)
|
||||
#endif
|
||||
PHP_FE(getcwd, NULL)
|
||||
PHP_FE(rewinddir, NULL)
|
||||
|
@ -223,7 +223,7 @@ PHP_FUNCTION(closedir)
|
||||
|
||||
/* }}} */
|
||||
|
||||
#if !defined(ZEND_WIN32)&&!defined(ZTS)
|
||||
#if defined(HAVE_CHROOT) && !defined(ZTS)
|
||||
/* {{{ proto int chroot(string directory)
|
||||
Change root directory */
|
||||
|
||||
|
@ -28,7 +28,7 @@ PHP_RINIT_FUNCTION(dir);
|
||||
PHP_FUNCTION(opendir);
|
||||
PHP_FUNCTION(closedir);
|
||||
PHP_FUNCTION(chdir);
|
||||
#if !defined(ZEND_WIN32)&&!defined(ZTS)
|
||||
#if defined(HAVE_CHROOT) && !defined(ZTS)
|
||||
PHP_FUNCTION(chroot);
|
||||
#endif
|
||||
PHP_FUNCTION(getcwd);
|
||||
|
Loading…
Reference in New Issue
Block a user