]> git.ipfire.org Git - thirdparty/glibc.git/commit
glob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir
authorFlorian Weimer <fweimer@redhat.com>
Fri, 29 Apr 2016 07:33:07 +0000 (09:33 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 9 May 2016 10:13:36 +0000 (12:13 +0200)
commit68302147ee061c69eb447e243ad9a18ef4cfbc4c
tree6cc5cec5d0f89f02dce17e4a66521d78fda834c0
parent90c0f166e9fd6b2c7685437558cf7e8f8bc6876a
glob: Simplify the interface for the GLOB_ALTDIRFUNC callback gl_readdir

Previously, application code had to set up the d_namlen member if
the target supported it, involving conditional compilation.  After
this change, glob will use the length of the string in d_name instead
of d_namlen to determine the file name length.  All glibc targets
provide the d_type and d_ino members, and setting them as needed for
gl_readdir is straightforward.

Changing the behavior with regards to d_ino is left to a future
cleanup.

(cherry picked from commit 137fe72eca6923a00381a3ca9f0e7672c1f85e3f)
ChangeLog
manual/examples/mkdirent.c [new file with mode: 0644]
manual/pattern.texi
posix/bug-glob2.c
posix/glob.c
posix/tst-gnuglob.c