diff options
author | mikeh <mikeh@FreeBSD.org> | 2001-07-29 00:52:37 +0000 |
---|---|---|
committer | mikeh <mikeh@FreeBSD.org> | 2001-07-29 00:52:37 +0000 |
commit | b925de092b1a33961fdd0e75d235854989006ed8 (patch) | |
tree | e6d5842b2c36ce1aaf0b631a9291c734c7cb9d3e /libexec | |
parent | b9208b18d5d6f747062fbda0a70c27212711ab0a (diff) | |
download | FreeBSD-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 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 2 | ||||
-rw-r--r-- | libexec/ftpd/popen.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index be02623..f9556e0 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2658,7 +2658,7 @@ send_file_list(whichf) memset(&gl, 0, sizeof(gl)); gl.gl_matchc = MAXGLOBARGS; - flags |= GLOB_MAXPATH; + flags |= GLOB_LIMIT; freeglob = 1; if (glob(whichf, flags, 0, &gl)) { reply(550, "not found"); diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index e8d3cfb..28cecfb 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -108,7 +108,7 @@ ftpd_popen(program, type) memset(&gl, 0, sizeof(gl)); gl.gl_matchc = MAXGLOBARGS; - flags |= GLOB_MAXPATH; + flags |= GLOB_LIMIT; if (glob(argv[argc], flags, NULL, &gl)) gargv[gargc++] = strdup(argv[argc]); else |