diff options
author | foobar <sniper@php.net> | 2003-02-19 09:25:16 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-02-19 09:25:16 +0000 |
commit | ec11fe04e9f0c1d34051efdac8d8ce106878f319 (patch) | |
tree | 8ce765d60f6dfb232f2f96350e7331d916e92589 /main/php_scandir.c | |
parent | 8e3f23e3c00a4973acb75cbafc15fea1c7f2bc4f (diff) | |
download | php-git-ec11fe04e9f0c1d34051efdac8d8ce106878f319.tar.gz |
Fix the possible conflicts with other libs (like libc-client)
Diffstat (limited to 'main/php_scandir.c')
-rw-r--r-- | main/php_scandir.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/main/php_scandir.c b/main/php_scandir.c index 148c8828a3..15d4febf4a 100644 --- a/main/php_scandir.c +++ b/main/php_scandir.c @@ -17,6 +17,8 @@ +----------------------------------------------------------------------+ */ +/* $Id$ */ + #ifdef PHP_WIN32 #include "config.w32.h" #else @@ -26,7 +28,10 @@ #include "php_scandir.h" #ifndef HAVE_SCANDIR + +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif #ifdef HAVE_DIRENT_H #include <dirent.h> @@ -38,19 +43,23 @@ #include <stdlib.h> #include <search.h> -#endif + +#endif /* HAVE_SCANDIR */ #ifndef HAVE_ALPHASORT + +#ifdef HAVE_STRING_H #include <string.h> +#endif -int alphasort(const struct dirent **a, const struct dirent **b) +int php_alphasort(const struct dirent **a, const struct dirent **b) { return strcoll((*a)->d_name,(*b)->d_name); } -#endif +#endif /* HAVE_ALPHASORT */ #ifndef HAVE_SCANDIR -int scandir(const char *dirname, struct dirent **namelist[], int (*selector) (const struct dirent *entry), int (*compare) (const struct dirent **a, const struct dirent **b)) +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)) { DIR *dirp = NULL; struct dirent **vector = NULL; @@ -117,3 +126,12 @@ fail: return -1; } #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ |