glob.h 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _GLOB_H
  2. #define _GLOB_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_size_t
  8. #include <bits/alltypes.h>
  9. typedef struct {
  10. size_t gl_pathc;
  11. char **gl_pathv;
  12. size_t gl_offs;
  13. int __dummy1;
  14. void *__dummy2[5];
  15. } glob_t;
  16. int glob(const char *__restrict, int, int (*)(const char *, int), glob_t *__restrict);
  17. void globfree(glob_t *);
  18. #define GLOB_ERR 0x01
  19. #define GLOB_MARK 0x02
  20. #define GLOB_NOSORT 0x04
  21. #define GLOB_DOOFFS 0x08
  22. #define GLOB_NOCHECK 0x10
  23. #define GLOB_APPEND 0x20
  24. #define GLOB_NOESCAPE 0x40
  25. #define GLOB_PERIOD 0x80
  26. #define GLOB_ONLYDIR 0x100
  27. #define GLOB_NOSPACE 1
  28. #define GLOB_ABORTED 2
  29. #define GLOB_NOMATCH 3
  30. #define GLOB_NOSYS 4
  31. #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
  32. #define glob64 glob
  33. #define globfree64 globfree
  34. #define glob64_t glob_t
  35. #endif
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif