1 /* @(#)fnmatch.h	8.13 10/10/09 Copyright 2006-2010 J. Schilling from 8.1 (Berkeley) */
2 
3 #ifndef	_SCHILY_FNMATCH_H
4 #define	_SCHILY_FNMATCH_H
5 
6 #ifndef _SCHILY_MCONFIG_H
7 #include <schily/mconfig.h>
8 #endif
9 
10 #ifdef	HAVE_FNMATCH_H
11 #include <fnmatch.h>
12 #else	/* !HAVE_FNMATCH_H */
13 
14 #ifdef	__cplusplus
15 extern "C" {
16 #endif
17 
18 extern int	 fnmatch __PR((const char *, const char *, int));
19 
20 #ifdef	__cplusplus
21 }
22 #endif
23 
24 #endif /* !HAVE_FNMATCH */
25 
26 /*
27  * Copyright (c) 1992, 1993
28  *	The Regents of the University of California.  All rights reserved.
29  *
30  * Redistribution and use in source and binary forms, with or without
31  * modification, are permitted provided that the following conditions
32  * are met:
33  * 1. Redistributions of source code must retain the above copyright
34  *    notice, this list of conditions and the following disclaimer.
35  * 2. Redistributions in binary form must reproduce the above copyright
36  *    notice, this list of conditions and the following disclaimer in the
37  *    documentation and/or other materials provided with the distribution.
38  * 3. Neither the name of the University nor the names of its contributors
39  *    may be used to endorse or promote products derived from this software
40  *    without specific prior written permission.
41  *
42  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
43  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
46  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
48  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52  * SUCH DAMAGE.
53  *
54  *	@(#)fnmatch.h	8.13 (Berkeley) 10/09/10
55  */
56 
57 #ifdef	__cplusplus
58 extern "C" {
59 #endif
60 
61 #ifndef	FNM_NOMATCH
62 #define	FNM_NOMATCH	1	/* Match failed. */
63 #endif
64 #ifndef	FNM_ERROR
65 #define	FNM_ERROR	2	/* An error occured */
66 #endif
67 #ifndef	FNM_NOSYS
68 #define	FNM_NOSYS	3	/* Function (XPG4) not supported */
69 #endif
70 
71 #ifndef	FNM_NOESCAPE
72 #define	FNM_NOESCAPE	0x01	/* Disable backslash escaping. */
73 #endif
74 #ifndef	FNM_PATHNAME
75 #define	FNM_PATHNAME	0x02	/* Slash must be matched by slash. */
76 #endif
77 #ifndef	FNM_PERIOD
78 #define	FNM_PERIOD	0x04	/* Period must be matched by period. */
79 #endif
80 #if	!defined(FNM_IGNORECASE) && !defined(FNM_CASEFOLD)
81 #define	FNM_IGNORECASE	0x10	/* Ignore case when making comparisons */
82 #endif
83 #if	!defined(FNM_IGNORECASE) && defined(FNM_CASEFOLD)
84 #define	FNM_IGNORECASE	FNM_CASEFOLD
85 #endif
86 #ifndef	FNM_CASEFOLD
87 #define	FNM_CASEFOLD	FNM_IGNORECASE
88 #endif
89 #ifndef	FNM_LEADING_DIR
90 #define	FNM_LEADING_DIR	0x20	/* Ignore /<tail> after Imatch. */
91 #endif
92 
93 extern int	 js_fnmatch __PR((const char *, const char *, int));
94 
95 #if	!defined(HAVE_FNMATCH_IGNORECASE)
96 #define	fnmatch	js_fnmatch
97 #endif
98 
99 #ifdef	__cplusplus
100 }
101 #endif
102 
103 #endif /* !_SCHILY_FNMATCH_H */
104