/src/php-src/main/php_scandir.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | +----------------------------------------------------------------------+ |
3 | | | Copyright (c) The PHP Group | |
4 | | +----------------------------------------------------------------------+ |
5 | | | This source file is subject to version 3.01 of the PHP license, | |
6 | | | that is bundled with this package in the file LICENSE, and is | |
7 | | | available through the world-wide-web at the following url: | |
8 | | | http://www.php.net/license/3_01.txt | |
9 | | | If you did not receive a copy of the PHP license and are unable to | |
10 | | | obtain it through the world-wide-web, please send a note to | |
11 | | | license@php.net so we can mail you a copy immediately. | |
12 | | +----------------------------------------------------------------------+ |
13 | | | Authors: Shane Caraveo <shane@caraveo.com> | |
14 | | | Ilia Alshanetsky <ilia@prohost.org> | |
15 | | +----------------------------------------------------------------------+ |
16 | | */ |
17 | | |
18 | | #ifndef PHP_SCANDIR_H |
19 | | #define PHP_SCANDIR_H |
20 | | |
21 | | #include <sys/types.h> |
22 | | |
23 | | #ifdef PHP_WIN32 |
24 | | #include "config.w32.h" |
25 | | #include "win32/readdir.h" |
26 | | #else |
27 | | #include <php_config.h> |
28 | | #endif |
29 | | |
30 | | #ifdef HAVE_DIRENT_H |
31 | | #include <dirent.h> |
32 | | #endif |
33 | | |
34 | | #ifdef HAVE_SCANDIR |
35 | 0 | #define php_scandir scandir |
36 | | #else |
37 | | 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)); |
38 | | #endif |
39 | | |
40 | | #ifdef HAVE_ALPHASORT |
41 | 0 | #define php_alphasort alphasort |
42 | | #else |
43 | | PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b); |
44 | | #endif |
45 | | |
46 | | #endif /* PHP_SCANDIR_H */ |