summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/file.c2
-rw-r--r--ext/standard/file.h2
4 files changed, 5 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 05ffbea347..d1c1587cce 100644
--- a/configure.in
+++ b/configure.in
@@ -395,6 +395,7 @@ mkstemp \
mmap \
nl_langinfo \
putenv \
+realpath \
random \
rand_r \
regcomp \
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index a8a630f972..efbbbf860e 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -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)
diff --git a/ext/standard/file.c b/ext/standard/file.c
index df03be59e9..e4b91526ba 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -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)
diff --git a/ext/standard/file.h b/ext/standard/file.h
index e3cdc4aad9..853cf1342f 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -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);