1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef _@GUARD_PREFIX@_FNMATCH_H
21
22 #if __GNUC__ >= 3
23 @PRAGMA_SYSTEM_HEADER@
24 #endif
25 @PRAGMA_COLUMNS@
26
27
28 #if @HAVE_FNMATCH_H@ && !@REPLACE_FNMATCH@
29 # @INCLUDE_NEXT@ @NEXT_FNMATCH_H@
30 #endif
31
32 #ifndef _@GUARD_PREFIX@_FNMATCH_H
33 #define _@GUARD_PREFIX@_FNMATCH_H
34
35
36
37
38
39
40
41 #if !@HAVE_FNMATCH_H@ || @REPLACE_FNMATCH@
42
43
44
45 #undef FNM_PATHNAME
46 #undef FNM_NOESCAPE
47 #undef FNM_PERIOD
48
49
50 #define FNM_PATHNAME (1 << 0)
51 #define FNM_NOESCAPE (1 << 1)
52 #define FNM_PERIOD (1 << 2)
53
54 #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
55 # define FNM_FILE_NAME FNM_PATHNAME
56 # define FNM_LEADING_DIR (1 << 3)
57 # define FNM_CASEFOLD (1 << 4)
58 # define FNM_EXTMATCH (1 << 5)
59 #endif
60
61
62 #define FNM_NOMATCH 1
63
64
65
66
67
68 #ifdef _XOPEN_SOURCE
69 # define FNM_NOSYS (-1)
70 #endif
71
72 #endif
73
74
75 #if @GNULIB_FNMATCH@
76
77
78 # if @REPLACE_FNMATCH@
79 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
80 # define fnmatch rpl_fnmatch
81 # endif
82 _GL_FUNCDECL_RPL (fnmatch, int,
83 (const char *pattern, const char *name, int flags)
84 _GL_ARG_NONNULL ((1, 2)));
85 _GL_CXXALIAS_RPL (fnmatch, int,
86 (const char *pattern, const char *name, int flags));
87 # else
88 # if !@HAVE_FNMATCH@
89 _GL_FUNCDECL_SYS (fnmatch, int,
90 (const char *pattern, const char *name, int flags)
91 _GL_ARG_NONNULL ((1, 2)));
92 # endif
93 _GL_CXXALIAS_SYS (fnmatch, int,
94 (const char *pattern, const char *name, int flags));
95 # endif
96 # if !GNULIB_FNMATCH_GNU && __GLIBC__ >= 2
97 _GL_CXXALIASWARN (fnmatch);
98 # endif
99 #elif defined GNULIB_POSIXCHECK
100 # undef fnmatch
101 # if HAVE_RAW_DECL_FNMATCH
102 _GL_WARN_ON_USE (fnmatch,
103 "fnmatch does not portably work - "
104 "use gnulib module fnmatch for portability or gnulib module fnmatch-gnu for a glibc compatible implementation");
105 # endif
106 #endif
107
108
109 #endif
110 #endif