+2003-06-03 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/generic/glob.c [HAVE_D_TYPE] (glob_in_dir): Also allow
+ DT_LNK entries if GLOB_ONLYDIR is set [PR libc/5043].
+ * posix/globtest.sh: Adjust for this change.
+
2003-06-02 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/ifaddrs.c (netlink_open): Call getsockname
trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15
+test -d $testdir/noread && chmod 777 $testdir/noread
rm -fr $testdir 2>/dev/null
mkdir $testdir
echo 1 > $testdir/file1
chmod a-r $testdir/noread
echo 1_1 > $testdir/dir1/file1_1
echo 1_2 > $testdir/dir1/file1_2
+ln -fs dir1 $testdir/link1
# Run some tests.
result=0
`dir2'
`file1'
`file2'
+`link1'
`noread'
`~file4'
EOF
`dir2'
`file1'
`file2'
+`link1'
`noread'
`~file4'
EOF
`dir2/'
`file1'
`file2'
+`link1/'
`noread/'
`~file4'
EOF
`dir2'
`file1'
`file2'
+`link1'
`noread'
`~file4'
EOF
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
`dir1/file1_2'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "Subdirs test failed" >> $logfile
sort > $testout
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
+`link1/file1_1'
EOF
if test $failed -ne 0; then
echo "Wildcard subdir test failed" >> $logfile
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
`dir1/file1_2'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "Wildcard2 subdir test failed" >> $logfile
sort > $testout
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
+`link1/file1_1'
EOF
if test $failed -ne 0; then
echo "Wildcard3 subdir test failed" >> $logfile
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
`dir1/file1_2'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "Wildcard6 subdir test failed" >> $logfile
cat <<"EOF" | cmp - $testout >> $logfile || failed=1
`dir1/file1_1'
`dir1/file1_2'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "Brackets test failed" >> $logfile
`dir1/file1_1'
`dir1/file1_2'
`file1'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "GLOB_APPEND test failed" >> $logfile
`dir1/file1_1'
`dir1/file1_2'
`file1'
+`link1/file1_1'
+`link1/file1_2'
EOF
if test $failed -ne 0; then
echo "GLOB_APPEND2 test failed" >> $logfile
/* If we shall match only directories use the information
provided by the dirent call if possible. */
if ((flags & GLOB_ONLYDIR)
- && d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
+ && d->d_type != DT_UNKNOWN
+ && d->d_type != DT_DIR
+ && d->d_type != DT_LNK)
continue;
#endif