Check that realpath is available. Bug: #9469

# TSRM still uses it without checking. I can't fix that.
This commit is contained in:
foobar 2001-10-23 11:14:51 +00:00
parent 76fcdc1afb
commit f73ee14bd9
4 changed files with 5 additions and 2 deletions

View File

@ -395,6 +395,7 @@ mkstemp \
mmap \
nl_langinfo \
putenv \
realpath \
random \
rand_r \
regcomp \

View File

@ -628,7 +628,7 @@ function_entry basic_functions[] = {
PHP_FE(socket_get_status, NULL)
#if (!defined(PHP_WIN32) && !defined(__BEOS__)) || defined(ZTS)
#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
PHP_FE(realpath, NULL)
#else
PHP_FALIAS(realpath, warn_not_available, NULL)

View File

@ -2270,7 +2270,7 @@ PHP_FUNCTION(fgetcsv)
/* }}} */
#if (!defined(PHP_WIN32) && !defined(__BEOS__)) || defined(ZTS)
#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
/* {{{ proto string realpath(string path)
Return the resolved path */
PHP_FUNCTION(realpath)

View File

@ -66,7 +66,9 @@ PHP_FUNCTION(flock);
PHP_FUNCTION(fd_set);
PHP_FUNCTION(fd_isset);
PHP_FUNCTION(select);
#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
PHP_FUNCTION(realpath);
#endif
PHP_NAMED_FUNCTION(php_if_ftruncate);
PHP_NAMED_FUNCTION(php_if_fstat);