1
0

glob.h 925 B

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