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] Allow [f]statfs64 to alias [f]statfs


Ping.

Steve Ellcey


On Wed, 2016-11-09 at 13:21 -0800, Steve Ellcey wrote:
> On Mon, 2016-11-07 at 14:13 -0800, Steve Ellcey wrote:
> > 
> > This is a preparatory patch for the ILP32 aarch64 patch.  On that
> > system statfs and fstatfs will match statfs64 and fstatfs64.  So
> > this patch follows what was already done for xstat and fxstat in
> > making the 64 bit entry points aliases of the regular
> > versions.  Right now this will not affect any existing platform
> > because none of them define STATFS_IS_STATFS64 but aarch64 will
> > define this later.
> > 
> > My main question is, is this an OK use of '#ifdef' or should the
> > STATFS_IS_STATFS64 be defined on all platforms (presumably in
> > kernel_stat.h) so that we can check the value instead of checking
> > to see it is defined or not?  I know that we want to move in that
> > direction but I wasn't sure if I should include that change in this
> > patch or not.  I also wasn't sure if I should try to change how
> > XSTAT_IS_XSTAT64 or STAT_IS_KERNEL_STAT are used.
> > 
> > There are 13 kernel_stat.h files in the glibc source tree, in
> > addition to a number of _HAVE_* macros, some of them define
> > XSTAT_IS_XSTAT64 and some define STAT_IS_KERNEL_STAT.  Those are
> > the only defines in those files right now.  So the magnitude of the
> > change isn't too large if we do want to define those two macros
> > everywhere.
> > 
> > I tested this patch on x86 to make sure nothing broke and I tested
> > with the full ILP32 aarch64 patch to make sure this part of the
> > patch worked with the rest of the ILP32 changes.
> > 
> > Is the patch OK like this or should it be redone?
> > 
> > Steve Ellcey
> > sellcey@caviumnetworks.com
> I have modified this patch, I missed a problem in the ILP32 glibc
> build and so I had to add the #define of some symbols to hide their
> prototypes when aliasing them.  This in turn required me to add some
> includes of kernel_stat.h.  This also matches what is being done with
> xstat.
> 
> Steve Ellcey
> sellcey@caviumnetworks.com
> 
> 
> 
> 2016-11-09  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.
> 	* 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.


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