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