summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-10-26 16:48:13 +1000
committerDamien Miller <djm@mindrot.org>2007-10-26 16:48:13 +1000
commit0ff80a1b17ab5c804fc123f79ed59df2559884bb (patch)
treee26bfc6cc1a1f713d95d47b1740ff5468f63e5e2
parenta95c0c224bf0969d57fabb27004f4c9b810c26fa (diff)
- millert@cvs.openbsd.org 2004/10/07 16:56:11
GLOB_NOESCAPE is POSIX so move it out of the #ifndef _POSIX_SOURCE block. (NB. mostly an RCS ID sync, as portable strips out the conditionals)
-rw-r--r--ChangeLog6
-rw-r--r--openbsd-compat/glob.h17
2 files changed, 13 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index b0c86e26d..dbae4398e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,10 @@
127 [openbsd-compat/sys-queue.h] 127 [openbsd-compat/sys-queue.h]
128 Enable QUEUE_MACRO_DEBUG on DIAGNOSTIC kernels. 128 Enable QUEUE_MACRO_DEBUG on DIAGNOSTIC kernels.
129 Input and okays from krw@, millert@, otto@, deraadt@, miod@. 129 Input and okays from krw@, millert@, otto@, deraadt@, miod@.
130 - millert@cvs.openbsd.org 2004/10/07 16:56:11
131 GLOB_NOESCAPE is POSIX so move it out of the #ifndef _POSIX_SOURCE
132 block.
133 (NB. mostly an RCS ID sync, as portable strips out the conditionals)
130 - (djm) [regress/sftp-cmds.sh] 134 - (djm) [regress/sftp-cmds.sh]
131 Use more restrictive glob to pick up test files from /bin - some platforms 135 Use more restrictive glob to pick up test files from /bin - some platforms
132 ship broken symlinks there which could spoil the test. 136 ship broken symlinks there which could spoil the test.
@@ -3403,4 +3407,4 @@
3403 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3407 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3404 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3408 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3405 3409
3406$Id: ChangeLog,v 1.4792 2007/10/26 06:46:31 djm Exp $ 3410$Id: ChangeLog,v 1.4793 2007/10/26 06:48:13 djm Exp $
diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h
index 9ba07f76e..9f53f7a21 100644
--- a/openbsd-compat/glob.h
+++ b/openbsd-compat/glob.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: glob.h,v 1.9 2004/10/07 16:56:11 millert Exp $ */ 1/* $OpenBSD: glob.h,v 1.10 2005/12/13 00:35:22 millert Exp $ */
2/* $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $ */ 2/* $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $ */
3 3
4/* 4/*
@@ -66,7 +66,6 @@ typedef struct {
66 int (*gl_stat)(const char *, struct stat *); 66 int (*gl_stat)(const char *, struct stat *);
67} glob_t; 67} glob_t;
68 68
69/* Flags */
70#define GLOB_APPEND 0x0001 /* Append to output from previous call. */ 69#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
71#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */ 70#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
72#define GLOB_ERR 0x0004 /* Return on error. */ 71#define GLOB_ERR 0x0004 /* Return on error. */
@@ -75,6 +74,13 @@ typedef struct {
75#define GLOB_NOSORT 0x0020 /* Don't sort. */ 74#define GLOB_NOSORT 0x0020 /* Don't sort. */
76#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */ 75#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
77 76
77/* Error values returned by glob(3) */
78#define GLOB_NOSPACE (-1) /* Malloc call failed. */
79#define GLOB_ABORTED (-2) /* Unignored error. */
80#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */
81#define GLOB_NOSYS (-4) /* Function not supported. */
82#define GLOB_ABEND GLOB_ABORTED
83
78#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ 84#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
79#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ 85#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
80#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ 86#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
@@ -83,13 +89,6 @@ typedef struct {
83#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */ 89#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
84#define GLOB_LIMIT 0x2000 /* Limit pattern match output to ARG_MAX */ 90#define GLOB_LIMIT 0x2000 /* Limit pattern match output to ARG_MAX */
85 91
86/* Error values returned by glob(3) */
87#define GLOB_NOSPACE (-1) /* Malloc call failed. */
88#define GLOB_ABORTED (-2) /* Unignored error. */
89#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */
90#define GLOB_NOSYS (-4) /* Function not supported. */
91#define GLOB_ABEND GLOB_ABORTED
92
93int glob(const char *, int, int (*)(const char *, int), glob_t *); 92int glob(const char *, int, int (*)(const char *, int), glob_t *);
94void globfree(glob_t *); 93void globfree(glob_t *);
95 94