Skip to content

Commit

Permalink
Check that realpath is available. Bug: #9469
Browse files Browse the repository at this point in the history
# TSRM still uses it without checking. I can't fix that.
  • Loading branch information
foobar committed Oct 23, 2001
1 parent 76fcdc1 commit f73ee14
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure.in
Expand Up @@ -395,6 +395,7 @@ mkstemp \
mmap \
nl_langinfo \
putenv \
realpath \
random \
rand_r \
regcomp \
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/basic_functions.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/file.c
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions ext/standard/file.h
Expand Up @@ -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);

Expand Down

0 comments on commit f73ee14

Please sign in to comment.