summaryrefslogtreecommitdiff
path: root/main/php_ini.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-02-19 09:25:16 +0000
committerfoobar <sniper@php.net>2003-02-19 09:25:16 +0000
commitec11fe04e9f0c1d34051efdac8d8ce106878f319 (patch)
tree8ce765d60f6dfb232f2f96350e7331d916e92589 /main/php_ini.c
parent8e3f23e3c00a4973acb75cbafc15fea1c7f2bc4f (diff)
downloadphp-git-ec11fe04e9f0c1d34051efdac8d8ce106878f319.tar.gz
Fix the possible conflicts with other libs (like libc-client)
Diffstat (limited to 'main/php_ini.c')
-rw-r--r--main/php_ini.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/php_ini.c b/main/php_ini.c
index 6e599ebcaf..1288774c93 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -30,11 +30,10 @@
#include "zend_highlight.h"
#include "SAPI.h"
#include "php_main.h"
+#include "php_scandir.h"
-#if !HAVE_SCANDIR || !HAVE_ALPHASORT
- #include "php_scandir.h"
-#else
- #include <dirent.h>
+#if HAVE_SCANDIR && HAVE_ALPHASORT && HAVE_DIRENT_H
+#include <dirent.h>
#endif
#ifndef S_ISREG
@@ -432,7 +431,7 @@ int php_init_config()
struct dirent **namelist;
int ndir, i;
- if ((ndir = scandir(PHP_CONFIG_FILE_SCAN_DIR, &namelist, 0, alphasort)) > 0) {
+ if ((ndir = php_scandir(PHP_CONFIG_FILE_SCAN_DIR, &namelist, 0, php_alphasort)) > 0) {
for (i = 0; i < ndir; i++) {
/* check for a .ini extension */
if (!(p = strrchr(namelist[i]->d_name, '.')) || (p && strcmp(p, ".ini"))) {