diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-31 14:34:25 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-31 15:08:44 -0700 |
commit | fd1daf4e1824bb46c08ba6244b4d41c8cecb3642 (patch) | |
tree | 0b4f19a24b3413edb1e1e9788f10804458549003 /modules/glob-tests | |
parent | c8e57c1ad7dabfd422a14015e1c81889eaf9d028 (diff) | |
download | gnulib-fd1daf4e1824bb46c08ba6244b4d41c8cecb3642.tar.gz |
glob: match dangling symlinks
This fixes a bug I inadvertently introduced to Gnulib when I
merged glibc glob back into gnulib on 2007-10-16. This fix is
inspired by a patch proposed for glibc by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
* doc/posix-functions/glob.texi: Update list of affected platforms.
* lib/glob.c (__lstat64): New macro.
(is_dir): New function.
(glob, glob_in_dir): Match symlinks even if they are dangling.
(link_stat, link_exists_p): Remove. All uses removed.
* lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
* m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
* modules/glob (Depends-on): Remove dirfd.
* modules/glob-tests (Depends-on): Add symlink.
* tests/test-glob.c: Include errno.h, unistd.h.
(BASE): New macro.
(main): Test dangling symlinks, if symlinks are supported.
Diffstat (limited to 'modules/glob-tests')
-rw-r--r-- | modules/glob-tests | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/glob-tests b/modules/glob-tests index 151bc06b32..abc3666edd 100644 --- a/modules/glob-tests +++ b/modules/glob-tests @@ -5,6 +5,7 @@ tests/macros.h Depends-on: glob-c++-tests +symlink configure.ac: |