35
35
* @(#)glob.h 8.1 (Berkeley) 6/2/93
36
36
*/
37
37
38
+ #ifdef PHP_WIN32
39
+ #include "config.w32.h"
40
+ #else
41
+ #include <php_config.h>
42
+ #endif
43
+
44
+ #ifndef _PHP_GLOB_H_
45
+ #define _PHP_GLOB_H_
46
+
38
47
#if defined(HAVE_GLOB ) && defined(PHP_SYSTEM_GLOB )
39
48
#include <glob.h>
40
49
50
+ #ifdef GLOB_APPEND
51
+ #define PHP_GLOB_APPEND GLOB_APPEND
52
+ #endif
53
+ #ifdef GLOB_DOOFFS
54
+ #define PHP_GLOB_DOOFFS GLOB_DOOFFS
55
+ #endif
56
+ #ifdef GLOB_ERR
57
+ #define PHP_GLOB_ERR GLOB_ERR
58
+ #endif
59
+ #ifdef GLOB_MARK
60
+ #define PHP_GLOB_MARK GLOB_MARK
61
+ #endif
62
+ #ifdef GLOB_NOCHECK
63
+ #define PHP_GLOB_NOCHECK GLOB_NOCHECK
64
+ #endif
65
+ #ifdef GLOB_NOSORT
66
+ #define PHP_GLOB_NOSORT GLOB_NOSORT
67
+ #endif
68
+ #ifdef GLOB_NOESCAPE
69
+ #define PHP_GLOB_NOESCAPE GLOB_NOESCAPE
70
+ #endif
71
+ #ifdef GLOB_NOSPACE
72
+ #define PHP_GLOB_NOSPACE GLOB_NOSPACE
73
+ #endif
74
+ #ifdef GLOB_ABORTED
75
+ #define PHP_GLOB_ABORTED GLOB_ABORTED
76
+ #endif
77
+ #ifdef GLOB_NOMATCH
78
+ #define PHP_GLOB_NOMATCH GLOB_NOMATCH
79
+ #endif
80
+ #ifdef GLOB_NOSYS
81
+ #define PHP_GLOB_NOSYS GLOB_NOSYS
82
+ #endif
83
+ #ifdef GLOB_ALTDIRFUNC
84
+ #define PHP_GLOB_ALTDIRFUNC GLOB_ALTDIRFUNC
85
+ #endif
86
+ #ifdef GLOB_BRACE
87
+ #define PHP_GLOB_BRACE GLOB_BRACE
88
+ #endif
89
+ #ifdef GLOB_MAGCHAR
90
+ #define PHP_GLOB_MAGCHAR GLOB_MAGCHAR
91
+ #endif
92
+ #ifdef GLOB_NOMAGIC
93
+ #define PHP_GLOB_NOMAGIC GLOB_NOMAGIC
94
+ #endif
95
+ #ifdef GLOB_QUOTE
96
+ #define PHP_GLOB_QUOTE GLOB_QUOTE
97
+ #endif
98
+ #ifdef GLOB_TILDE
99
+ #define PHP_GLOB_TILDE GLOB_TILDE
100
+ #endif
101
+ #ifdef GLOB_LIMIT
102
+ #define PHP_GLOB_LIMIT GLOB_LIMIT
103
+ #endif
104
+ #ifdef GLOB_KEEPSTAT
105
+ #define PHP_GLOB_KEEPSTAT GLOB_KEEPSTAT
106
+ #endif
107
+
41
108
#define php_glob_t glob_t
42
109
#define php_glob glob
43
- #define php_globfree
110
+ #define php_globfree globfree
44
111
#else
45
112
46
- #ifndef _PHP_GLOB_H_
47
- #define _PHP_GLOB_H_
113
+ #include "php.h"
48
114
49
115
#ifndef PHP_WIN32
50
116
# include <sys/cdefs.h>
@@ -102,7 +168,7 @@ PHPAPI int php_glob(const char *__restrict, int, int (*)(const char *, int),
102
168
PHPAPI void php_globfree (php_glob_t * );
103
169
END_EXTERN_C ()
104
170
105
- #endif /* !_GLOB_H_ */
171
+ #endif /* defined(HAVE_GLOB) */
106
172
107
173
/* These were copied from dir and zip */
108
174
@@ -115,4 +181,4 @@ END_EXTERN_C()
115
181
116
182
#define PHP_GLOB_AVAILABLE_FLAGS (0 | PHP_GLOB_BRACE | PHP_GLOB_MARK | PHP_GLOB_NOSORT | PHP_GLOB_NOCHECK | PHP_GLOB_NOESCAPE | PHP_GLOB_ERR | PHP_GLOB_ONLYDIR)
117
183
118
- #endif /* defined(HAVE_GLOB) */
184
+ #endif /* !_GLOB_H_ */
0 commit comments