pajoye Tue Dec 2 10:15:41 2008 UTC
Modified files:
/php-src/main php_scandir.c php_scandir.h
Log:
- MFB: export php_scandir and php_alphasort correctly (used by APC for
example)
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/main/php_scandir.c
diff -u php-src/main/php_scandir.c:1.19 php-src/main/php_scandir.c:1.20
--- php-src/main/php_scandir.c:1.19 Mon Dec 31 07:12:18 2007
+++ php-src/main/php_scandir.c Tue Dec 2 10:15:41 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_scandir.c,v 1.19 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_scandir.c,v 1.20 2008/12/02 10:15:41 pajoye Exp $ */
#include "php.h"
#include "php_scandir.h"
@@ -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;
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.h?r1=1.15&r2=1.16&diff_format=u
Index: php-src/main/php_scandir.h
diff -u php-src/main/php_scandir.h:1.15 php-src/main/php_scandir.h:1.16
--- php-src/main/php_scandir.h:1.15 Mon Dec 31 07:12:18 2007
+++ php-src/main/php_scandir.h Tue Dec 2 10:15:41 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_scandir.h,v 1.15 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_scandir.h,v 1.16 2008/12/02 10:15:41 pajoye Exp $ */
#ifndef PHP_SCANDIR_H
#define PHP_SCANDIR_H
@@ -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 */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php