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