From: Ulrich Drepper Date: Mon, 29 Apr 2002 04:32:06 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.30~21781 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=add09583da3f652a6695dd534ea9ed4aefca97a0;p=external%2Fglibc.git Update. * sysdeps/generic/glob.c (glob): Don't pass GLOB_NOMAGIC flag to glob_in_dir [PR libc/3385]. * posix/globtest.sh: Add test case. --- diff --git a/ChangeLog b/ChangeLog index f3e302a..026ef2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2002-04-28 Ulrich Drepper + * sysdeps/generic/glob.c (glob): Don't pass GLOB_NOMAGIC flag to + glob_in_dir [PR libc/3385]. + * posix/globtest.sh: Add test case. + * intl/loadmsgcat.c [!_LIBC] (_nl_init_domain_conv): Don't add //TRANSLIT twice. diff --git a/posix/globtest.sh b/posix/globtest.sh index a57c49f..d503256 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -211,6 +211,19 @@ if test $failed -ne 0; then result=1 fi +# Test NOMAGIC for subdirs +failed=0 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ +${common_objpfx}posix/globtest -g "$testdir" "*/does-not-exist" | +sort > $testout +cat <<"EOF" | cmp - $testout >> $logfile || failed=1 +GLOB_NOMATCH +EOF +if test $failed -ne 0; then + echo "No magic in subdir test failed" >> $logfile + result=1 +fi + # Test subdirs correctly failed=0 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c index af409c5..4a56f90 100644 --- a/sysdeps/generic/glob.c +++ b/sysdeps/generic/glob.c @@ -494,7 +494,7 @@ glob (pattern, flags, errfunc, pglob) #endif result = glob (onealt, - ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) + ((flags & ~(GLOB_NOCHECK | GLOB_NOMAGIC)) | GLOB_APPEND), errfunc, pglob); /* If we got an error, return it. */ @@ -929,7 +929,8 @@ glob (pattern, flags, errfunc, pglob) old_pathc = pglob->gl_pathc; status = glob_in_dir (filename, dirs.gl_pathv[i], - ((flags | GLOB_APPEND) & ~GLOB_NOCHECK), + ((flags | GLOB_APPEND) + & ~(GLOB_NOCHECK | GLOB_NOMAGIC)), errfunc, pglob); if (status == GLOB_NOMATCH) /* No matches in this directory. Try the next. */