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.h | |
| 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.h')
| -rw-r--r-- | main/php_scandir.h | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/main/php_scandir.h b/main/php_scandir.h index fc3b191dfb..4a8b57ed3f 100644 --- a/main/php_scandir.h +++ b/main/php_scandir.h @@ -1,3 +1,27 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 4 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2003 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Shane Caraveo <shane@caraveo.com> | + | Ilia Alshanetsky <ilia@prohost.org> | + +----------------------------------------------------------------------+ +*/ + +/* $Id$ */ + +#ifndef PHP_SCANDIR_H +#define PHP_SCANDIR_H + #include <sys/types.h> #ifdef PHP_WIN32 @@ -7,14 +31,19 @@ #include "php_config.h" #endif +#ifdef HAVE_SCANDIR #ifdef HAVE_DIRENT_H -# include <dirent.h> +#include <dirent.h> #endif - -#ifndef HAVE_ALPHASORT -int alphasort(const struct dirent **a, const struct dirent **b); +#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)); #endif -#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)); +#ifdef HAVE_ALPHASORT +#define php_alphasort alphasort +#else +int php_alphasort(const struct dirent **a, const struct dirent **b); #endif + +#endif /* PHP_SCANDIR_H */ |
