diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-02-28 09:25:58 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-04-06 17:49:02 -0300 |
commit | 942de61a89c5a01847d96831cb5e56630a7ba450 (patch) | |
tree | 1eacd59833b356072fee74f69d06e79eb9d2477a /sysdeps/posix | |
parent | 243f59e5aa97b0b5f1e6a78913cf7f1ba18bd4c3 (diff) | |
download | glibc-942de61a89c5a01847d96831cb5e56630a7ba450.tar.gz glibc-942de61a89c5a01847d96831cb5e56630a7ba450.tar.xz glibc-942de61a89c5a01847d96831cb5e56630a7ba450.zip |
Consolidate Linux readdir{64}{_r} implementation
This patch consolidates Linux readdir{64}{_r} implementation on just the default sysdeps/unix/sysv/linux/readdir{64}{_r}.c ones. The default implementation handle the Linux requirements: * readdir{_r} is only built for _DIRENT_MATCHES_DIRENT64 being 0. * readdir64{_r} is always built and aliased to readdir{_r} for ABI that define _DIRENT_MATCHES_DIRENT64. * A compat symbol is added for readdir64{_r} for ABI that used to export the old non-LFS version. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and powerpc64le-linux-gnu. * sysdeps/posix/readdir.c (__READDIR, __GETDENTS, DIRENTY_TYPE, __READDIR_ALIAS): Undefine after usage. * sysdeps/posix/readdir_r.c (__READDIR_R, __GETDENTS, DIRENT_TYPE, __READDIR_R_ALIAS): Likewise. * sysdeps/unix/sysv/linux/arm/readdir64.c: Remove file. * sysdeps/unix/sysv/linux/arm/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/m68k/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/m68k/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/i386/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/readdir.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/readdir64.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/readdir64_r.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Likewise. * sysdeps/unix/sysv/linux/readdir.c: New file. * sysdeps/unix/sysv/linux/readdir_r.c: Likewise. * sysdeps/unix/sysv/linux/readdir64.c: Add compat symbol if required. * sysdeps/unix/sysv/linux/readdir64_r.c: Likewise.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/readdir.c | 5 | ||||
-rw-r--r-- | sysdeps/posix/readdir_r.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/posix/readdir.c b/sysdeps/posix/readdir.c index fcd385392e..a6ecc0fe5b 100644 --- a/sysdeps/posix/readdir.c +++ b/sysdeps/posix/readdir.c @@ -120,3 +120,8 @@ __READDIR (DIR *dirp) #ifdef __READDIR_ALIAS weak_alias (__readdir, readdir) #endif + +#undef __READDIR +#undef __GETDENTS +#undef DIRENT_TYPE +#undef __READDIR_ALIAS diff --git a/sysdeps/posix/readdir_r.c b/sysdeps/posix/readdir_r.c index 79030ab725..2d691e7242 100644 --- a/sysdeps/posix/readdir_r.c +++ b/sysdeps/posix/readdir_r.c @@ -152,3 +152,8 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result) #ifdef __READDIR_R_ALIAS weak_alias (__readdir_r, readdir_r) #endif + +#undef __READDIR_R +#undef __GETDENTS +#undef DIRENT_TYPE +#undef __READDIR_R_ALIAS |