php_scandir.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Shane Caraveo <shane@caraveo.com> |
  16. | Ilia Alshanetsky <ilia@prohost.org> |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef PHP_SCANDIR_H
  20. #define PHP_SCANDIR_H
  21. #include <sys/types.h>
  22. #ifdef HAVE_SYS_DIR_H
  23. #include <sys/dir.h>
  24. #endif
  25. #ifdef PHP_WIN32
  26. #include "config.w32.h"
  27. #include "win32/readdir.h"
  28. #else
  29. #include <php_config.h>
  30. #endif
  31. #ifdef HAVE_DIRENT_H
  32. #include <dirent.h>
  33. #endif
  34. #ifdef HAVE_SCANDIR
  35. #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. #ifdef HAVE_ALPHASORT
  40. #define php_alphasort alphasort
  41. #else
  42. PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b);
  43. #endif
  44. #endif /* PHP_SCANDIR_H */
  45. /*
  46. * Local variables:
  47. * tab-width: 4
  48. * c-basic-offset: 4
  49. * End:
  50. * vim600: sw=4 ts=4 fdm=marker
  51. * vim<600: sw=4 ts=4
  52. */