[PATCH] Allow [f]statfs64 to alias [f]statfs

Steve Ellcey sellcey@caviumnetworks.com
Mon Nov 21 18:07:00 GMT 2016


On Thu, 2016-11-17 at 09:53 +0100, Andreas Schwab wrote:
> 
> Since it is a new symbol it should follow the policy of always being
> defined.
> 
> > 
> > 	* sysdeps/unix/sysv/linux/fstatfs64.c: Make __fstatfs and
> > fstatfs
> > 	aliases of __fstatfs64 if __STATFS_IS_STATFS64 is set.
> > 	* sysdeps/unix/sysv/linux/statfs64.c: Ditto for __statfs, statfs,
> > 	and __statfs64.
> > 	* sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: Do not
> > 	define __fstatfs and fstatfs if __STATFS_IS_STATFS64 is set.
> > 	* sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: Ditto
> > 	for __statfs and statfs.
> It's STATFS_IS_STATFS64, not __STATFS_IS_STATFS64.
> 
> Andreas.

Here is my updated patch, retested on x86 and aarch64.  It defines
STATFS_IS_STATFS64 to 0 on all platforms, when the ILP32 aarch code is
checked in it will have a new kernel_stat.h file and that will set it
to 1.  I also fixed and upated the ChangeLog entry.

Steve Ellcey
sellcey@caviumnetworks.com


2016-11-21  Steve Ellcey  <sellcey@caviumnetworks.com>

	* sysdeps/unix/sysv/linux/fstatfs64.c: Hide prototypes for fstatfs
	and __fstatfs.  Make them aliases of __fstatfs64 if
	STATFS_IS_STATFS64 is set to non-zero.
	* sysdeps/unix/sysv/linux/statfs64.c: Ditto for __statfs, statfs,
	and __statfs64.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: Do not
	define __fstatfs and fstatfs if STATFS_IS_STATFS64 is non-zero.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: Ditto
	for __statfs and statfs.
	* sysdeps/unix/sysv/linux/alpha/kernel_stat.h: Set STATFS_IS_STATFS64
	to 0.
	* sysdeps/unix/sysv/linux/generic/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/hppa/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/ia64/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/microblaze/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/x86_64/kernel_stat.h: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statfs.patch
Type: text/x-patch
Size: 8180 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20161121/8ae6884b/attachment.bin>


More information about the Libc-alpha mailing list