This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
GLOB_NOCHECK broken in some cases?
- From: Ben Collins <bcollins at debian dot org>
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Date: Sun, 9 Dec 2001 10:50:03 -0500
- Subject: GLOB_NOCHECK broken in some cases?
This test case shows glob's GLOB_NOCHECK appears to be broken in some
cases. Can someone confirm that this is a bug and not just a
misunderstanding of the expected behavior?
The test returns 0 for the glob() call, and 0 for gl_pathc, aswell as a
NULL in gl_pathv[0]. My assumption (and the reporter of this bug) is
that it should return 0 for the glob() call, and gl_pathc=1 with the
orignal match in gl_pathv[0].
Ben
--
.----------=======-=-======-=========-----------=====------------=-=-----.
/ Ben Collins -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
#include <glob.h>
int main() {
glob_t pglob;
printf("%d\n", glob("*./a", GLOB_NOCHECK, 0, &pglob));
printf("%d\n", pglob.gl_pathc);
printf("%s\n", pglob.gl_pathv[0]);
return 0;
}