Back to index

php5  5.3.10
php_scandir.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Shane Caraveo <shane@caraveo.com>                           |
00016    |          Ilia Alshanetsky  <ilia@prohost.org>                        |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_scandir.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_SCANDIR_H
00023 #define PHP_SCANDIR_H
00024 
00025 #include <sys/types.h>
00026 
00027 #ifdef HAVE_SYS_DIR_H
00028 #include <sys/dir.h>
00029 #endif
00030 
00031 #ifdef PHP_WIN32
00032 #include "config.w32.h"
00033 #include "win32/readdir.h"
00034 #else
00035 #include <php_config.h>
00036 #endif
00037 
00038 #ifdef HAVE_DIRENT_H
00039 #include <dirent.h>
00040 #endif
00041 
00042 #ifdef HAVE_SCANDIR
00043 #define php_scandir         scandir
00044 #else
00045 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));
00046 #endif
00047 
00048 #ifdef HAVE_ALPHASORT
00049 #define php_alphasort       alphasort
00050 #else
00051 PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b);
00052 #endif
00053 
00054 #endif /* PHP_SCANDIR_H */