mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
- export php_scandir and php_alphasort correctly (used by APC for example)
This commit is contained in:
parent
4b24c89a9d
commit
ef68d9fc72
@ -50,14 +50,14 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
int php_alphasort(const struct dirent **a, const struct dirent **b)
|
||||
PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b)
|
||||
{
|
||||
return strcoll((*a)->d_name,(*b)->d_name);
|
||||
}
|
||||
#endif /* HAVE_ALPHASORT */
|
||||
|
||||
#ifndef HAVE_SCANDIR
|
||||
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))
|
||||
PHPAPI 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;
|
||||
|
@ -42,13 +42,13 @@
|
||||
#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));
|
||||
PHPAPI 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
|
||||
|
||||
#ifdef HAVE_ALPHASORT
|
||||
#define php_alphasort alphasort
|
||||
#else
|
||||
int php_alphasort(const struct dirent **a, const struct dirent **b);
|
||||
PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b);
|
||||
#endif
|
||||
|
||||
#endif /* PHP_SCANDIR_H */
|
||||
|
Loading…
Reference in New Issue
Block a user