aboutsummaryrefslogtreecommitdiff
path: root/include/glob.h
diff options
context:
space:
mode:
authorMike Heffner <mikeh@FreeBSD.org>2001-07-29 00:52:37 +0000
committerMike Heffner <mikeh@FreeBSD.org>2001-07-29 00:52:37 +0000
commit75dc5f1a82b7d3dfb585c549c9e318b0323c70f5 (patch)
treee6d5842b2c36ce1aaf0b631a9291c734c7cb9d3e /include/glob.h
parent5d89a197530747bf87253d15036cd876c93f3560 (diff)
downloadsrc-75dc5f1a82b7d3dfb585c549c9e318b0323c70f5.tar.gz
src-75dc5f1a82b7d3dfb585c549c9e318b0323c70f5.zip
Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible
with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc' patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to maintain backwards compatibility. Reviewed by: sheldonh, assar Obtained from: NetBSD/OpenBSD
Notes
Notes: svn path=/head/; revision=80525
Diffstat (limited to 'include/glob.h')
-rw-r--r--include/glob.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/glob.h b/include/glob.h
index 7b74d33afd5a..cd49ea8d82bd 100644
--- a/include/glob.h
+++ b/include/glob.h
@@ -77,11 +77,13 @@ typedef struct {
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_MAXPATH 0x1000 /* limit number of returned paths */
+#define GLOB_LIMIT 0x1000 /* limit number of returned paths */
+
+/* backwards compatibility, this is the old name for this option */
+#define GLOB_MAXPATH GLOB_LIMIT
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
#define GLOB_ABEND (-2) /* Unignored error. */
-#define GLOB_LIMIT (-3) /* Path limit was hit. */
__BEGIN_DECLS
int glob __P((const char *, int, int (*)(const char *, int), glob_t *));