xref: /freebsd/crypto/openssh/openbsd-compat/fnmatch.h (revision 19261079b74319502c6ffa1249920079f0f69a72)
1*19261079SEd Maste /*	$OpenBSD: fnmatch.h,v 1.8 2005/12/13 00:35:22 millert Exp $	*/
2*19261079SEd Maste /*	$NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $	*/
3*19261079SEd Maste 
4*19261079SEd Maste /*-
5*19261079SEd Maste  * Copyright (c) 1992, 1993
6*19261079SEd Maste  *	The Regents of the University of California.  All rights reserved.
7*19261079SEd Maste  *
8*19261079SEd Maste  * Redistribution and use in source and binary forms, with or without
9*19261079SEd Maste  * modification, are permitted provided that the following conditions
10*19261079SEd Maste  * are met:
11*19261079SEd Maste  * 1. Redistributions of source code must retain the above copyright
12*19261079SEd Maste  *    notice, this list of conditions and the following disclaimer.
13*19261079SEd Maste  * 2. Redistributions in binary form must reproduce the above copyright
14*19261079SEd Maste  *    notice, this list of conditions and the following disclaimer in the
15*19261079SEd Maste  *    documentation and/or other materials provided with the distribution.
16*19261079SEd Maste  * 3. Neither the name of the University nor the names of its contributors
17*19261079SEd Maste  *    may be used to endorse or promote products derived from this software
18*19261079SEd Maste  *    without specific prior written permission.
19*19261079SEd Maste  *
20*19261079SEd Maste  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21*19261079SEd Maste  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*19261079SEd Maste  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*19261079SEd Maste  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24*19261079SEd Maste  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*19261079SEd Maste  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*19261079SEd Maste  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*19261079SEd Maste  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*19261079SEd Maste  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*19261079SEd Maste  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*19261079SEd Maste  * SUCH DAMAGE.
31*19261079SEd Maste  *
32*19261079SEd Maste  *	@(#)fnmatch.h	8.1 (Berkeley) 6/2/93
33*19261079SEd Maste  */
34*19261079SEd Maste 
35*19261079SEd Maste /* OPENBSD ORIGINAL: include/fnmatch.h */
36*19261079SEd Maste 
37*19261079SEd Maste #ifndef HAVE_FNMATCH_H
38*19261079SEd Maste /* Ensure we define FNM_CASEFOLD */
39*19261079SEd Maste #define __BSD_VISIBLE 1
40*19261079SEd Maste 
41*19261079SEd Maste #ifndef	_FNMATCH_H_
42*19261079SEd Maste #define	_FNMATCH_H_
43*19261079SEd Maste 
44*19261079SEd Maste #ifdef HAVE_SYS_CDEFS_H
45*19261079SEd Maste #include <sys/cdefs.h>
46*19261079SEd Maste #endif
47*19261079SEd Maste 
48*19261079SEd Maste #define	FNM_NOMATCH	1	/* Match failed. */
49*19261079SEd Maste #define	FNM_NOSYS	2	/* Function not supported (unused). */
50*19261079SEd Maste 
51*19261079SEd Maste #define	FNM_NOESCAPE	0x01	/* Disable backslash escaping. */
52*19261079SEd Maste #define	FNM_PATHNAME	0x02	/* Slash must be matched by slash. */
53*19261079SEd Maste #define	FNM_PERIOD	0x04	/* Period must be matched by period. */
54*19261079SEd Maste #if __BSD_VISIBLE
55*19261079SEd Maste #define	FNM_LEADING_DIR	0x08	/* Ignore /<tail> after Imatch. */
56*19261079SEd Maste #define	FNM_CASEFOLD	0x10	/* Case insensitive search. */
57*19261079SEd Maste #define	FNM_IGNORECASE	FNM_CASEFOLD
58*19261079SEd Maste #define	FNM_FILE_NAME	FNM_PATHNAME
59*19261079SEd Maste #endif
60*19261079SEd Maste 
61*19261079SEd Maste /* __BEGIN_DECLS */
62*19261079SEd Maste int	 fnmatch(const char *, const char *, int);
63*19261079SEd Maste /* __END_DECLS */
64*19261079SEd Maste 
65*19261079SEd Maste #endif /* !_FNMATCH_H_ */
66*19261079SEd Maste #endif /* ! HAVE_FNMATCH_H */
67