xref: /PHP-8.4/ext/standard/php_dir_int.h (revision 50b3a0d0)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13  */
14 
15 /* internal header; not supposed to be installed; FIXME but unfortunately is */
16 
17 #ifndef PHP_DIR_INT_H
18 #define PHP_DIR_INT_H
19 
20 #ifdef HAVE_GLOB
21 #ifndef PHP_WIN32
22 #include <glob.h>
23 #else
24 #include "win32/glob.h"
25 #endif
26 #endif
27 
28 #ifdef HAVE_GLOB
29 
30 #ifndef GLOB_BRACE
31 #define GLOB_BRACE 0
32 #endif
33 
34 #ifndef GLOB_ERR
35 #define GLOB_ERR 0
36 #endif
37 
38 #ifndef GLOB_MARK
39 #define GLOB_MARK 0
40 #endif
41 
42 #ifndef GLOB_NOCHECK
43 #define GLOB_NOCHECK 0
44 #endif
45 
46 #ifndef GLOB_NOESCAPE
47 #define GLOB_NOESCAPE 0
48 #endif
49 
50 #ifndef GLOB_NOSORT
51 #define GLOB_NOSORT 0
52 #endif
53 
54 #ifndef GLOB_ONLYDIR
55 #define GLOB_ONLYDIR (1<<30)
56 #define GLOB_EMULATE_ONLYDIR
57 #define GLOB_FLAGMASK (~GLOB_ONLYDIR)
58 #else
59 #define GLOB_FLAGMASK (~0)
60 #endif
61 
62 /* This is used for checking validity of passed flags (passing invalid flags causes segfault in glob()!! */
63 #define GLOB_AVAILABLE_FLAGS (0 | GLOB_BRACE | GLOB_MARK | GLOB_NOSORT | GLOB_NOCHECK | GLOB_NOESCAPE | GLOB_ERR | GLOB_ONLYDIR)
64 
65 #endif /* HAVE_GLOB */
66 
67 char dirsep_str[2], pathsep_str[2];
68 
69 #endif /* PHP_DIR_INT_H */
70