]> granicus.if.org Git - php/commitdiff
dirent.h needs to be included always.
authorfoobar <sniper@php.net>
Wed, 19 Feb 2003 18:45:03 +0000 (18:45 +0000)
committerfoobar <sniper@php.net>
Wed, 19 Feb 2003 18:45:03 +0000 (18:45 +0000)
main/php_scandir.c
main/php_scandir.h

index 15d4febf4a069e1410bb192dfae88219e5cd9d36..139e1c27cbdfcbebdf3b6eba3f3a8993e8446b03 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "php_scandir.h"
 
-#ifndef HAVE_SCANDIR
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -37,6 +35,8 @@
 #include <dirent.h>
 #endif
 
+#ifndef HAVE_SCANDIR
+
 #ifdef PHP_WIN32
 #include "win32/readdir.h"
 #endif  
index 4a8b57ed3f31492850738f5f0ef2688d2530645e..961188e7ad891e729829969e8f3cb1b9d97fd882 100644 (file)
 #include "php_config.h"
 #endif
 
-#ifdef HAVE_SCANDIR
 #ifdef HAVE_DIRENT_H
 #include <dirent.h>
 #endif
+
+#ifdef HAVE_SCANDIR
 #define php_scandir            scandir
 #else
 int php_scandir(const char *dirname, struct dirent **namelist[], int (*selector) (const struct dirent *entry), int (*compare) (const struct dirent **a, const struct dirent **b));