[PATCH] generic/wordsize-32: don't declare getdents() if not needed
Yury Norov
ynorov@caviumnetworks.com
Tue Oct 25 20:46:00 GMT 2016
On Mon, Sep 19, 2016 at 07:56:44PM +0300, Yury Norov wrote:
>
> Modern 32-bit arches has off_t and ino_t types both 64-bit length. It means that
> struct dirent is the same as struct dirent64. So we can avoid useless conversion
> from 64- to 32-bit dirent layout, and simply alias __getdents64() to __getdents().
> The same is true if __USE_FILE_OFFSET64 option is enabled.
>
> Tested with aarch64/ilp32.
>
> 2016-09-19: Yury Norov <ynorov@caviumnetworks.com>
>
> * sysdeps/unix/sysv/linux/bits/dirent.h: enable _DIRENT_MATCHES_DIRENT64
> if __USE_FILE_OFFSET64 is enabled.
> * sysdeps/unix/sysv/linux/generic/getdents64.c: alias __getdents64() to
> __getdents() also if _DIRENT_MATCHES_DIRENT64 is enabled.
> * sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c: don't declare
> __getdents() if _DIRENT_MATCHES_DIRENT64 is enabled.
>
> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Ping?
More information about the Libc-alpha
mailing list