summaryrefslogtreecommitdiffstats
path: root/include/glob.h
diff options
context:
space:
mode:
authormikeh <mikeh@FreeBSD.org>2001-07-29 00:52:37 +0000
committermikeh <mikeh@FreeBSD.org>2001-07-29 00:52:37 +0000
commitb925de092b1a33961fdd0e75d235854989006ed8 (patch)
treee6d5842b2c36ce1aaf0b631a9291c734c7cb9d3e /include/glob.h
parentb9208b18d5d6f747062fbda0a70c27212711ab0a (diff)
downloadFreeBSD-src-b925de092b1a33961fdd0e75d235854989006ed8.zip
FreeBSD-src-b925de092b1a33961fdd0e75d235854989006ed8.tar.gz
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
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 7b74d33..cd49ea8 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 *));
OpenPOWER on IntegriCloud