This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] generic/wordsize-32: don't declare getdents() if not needed


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]