summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1993-06-16 17:17:30 +0000
committerjtc <jtc@NetBSD.org>1993-06-16 17:17:30 +0000
commit9a11d802b6be136453fcc4bb32e23fa5d54060e5 (patch)
treee0f6a124d78815367412c6f13305589244dd376e /include
parentdacb3d324d4accb64a4c2721300a65549d7713c5 (diff)
Update fnmatch to be more posix complient (from keith bostic)
Diffstat (limited to 'include')
-rw-r--r--include/fnmatch.h51
-rw-r--r--include/unistd.h9
2 files changed, 52 insertions, 8 deletions
diff --git a/include/fnmatch.h b/include/fnmatch.h
new file mode 100644
index 00000000000..9701b5090cf
--- /dev/null
+++ b/include/fnmatch.h
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)fnmatch.h 5.1 (Berkeley) 6/28/92
+ */
+
+#ifndef _FNMATCH_H_
+#define _FNMATCH_H_
+
+#define FNM_NOMATCH 1 /* Match failed. */
+
+#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
+#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
+#define FNM_PERIOD 0x04 /* Period must be matched by period. */
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int fnmatch __P((const char *, const char *, int));
+__END_DECLS
+
+#endif /* !_FNMATCH_H_ */
diff --git a/include/unistd.h b/include/unistd.h
index 9675bd641c6..6e02e7abf65 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -40,16 +40,10 @@
#include <sys/types.h>
#include <sys/unistd.h>
-#define STDIN_FILENO 0 /* standard input file descriptor */
+#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
-/* fnmatch(3) defines */
-#define FNM_PATHNAME 0x01 /* match pathnames, not filenames */
-#ifndef _POSIX_SOURCE
-#define FNM_QUOTE 0x02 /* escape special chars with \ */
-#endif
-
#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif
@@ -123,7 +117,6 @@ int exect __P((const char *, char * const *, char * const *));
int fchdir __P((int));
int fchflags __P((int, long));
int fchown __P((int, int, int));
-int fnmatch __P((const char *, const char *, int));
int fsync __P((int));
int ftruncate __P((int, off_t));
int getdtablesize __P((void));