2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)fnmatch.h 1.4 04/03/02 eric */
15 * Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
17 * NOTE: The canonical source of this file is maintained with the GNU C Library.
18 * Bugs can be reported to bug-glibc@prep.ai.mit.edu.
20 * This program is free software; you can redistribute it and/or modify it
21 * under the terms of the GNU General Public License as published by the
22 * Free Software Foundation; either version 2, or (at your option) any
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
47 /*#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)*/
50 #define __P(protos) protos
51 #else /* Not C++ or ANSI C. */
53 #define __P(protos) ()
55 * We can get away without defining `const' here only because in this file
56 * it is used only inside the prototype for `fnmatch', which is elided in
57 * non-ANSI C where `const' is problematical.
59 #endif /* C++ or ANSI C. */
63 * We #undef these before defining them because some losing systems
64 * (HP-UX A.08.07 for example) define these in <unistd.h>.
70 /* Bits set in the FLAGS argument to `fnmatch'. */
71 #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
72 #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
73 #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
75 #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE)
76 #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
77 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
78 #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
83 * Apparently GNU libc doesn't define this thing.
85 #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
88 /* Value returned by `fnmatch' if STRING does not match PATTERN. */
92 * Match STRING against the filename pattern PATTERN,
93 * returning zero if it matches, FNM_NOMATCH if not.
95 extern int fnmatch(const char *__pattern, const char *__string, int __flags);
101 #endif /* fnmatch.h */