This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: struct statfs/statfs64 in linux-generic


On 11/13/2013 11:34 PM, Chung-Lin Tang wrote:
> On 13/11/13 8:58 PM, Joseph S. Myers wrote:
>> On Wed, 13 Nov 2013, Chung-Lin Tang wrote:
>>
>>> 	(struct statfs): Use __alignof__(__u64) in alignment attribute
>>> 	instead of 8.
>>> 	(struct statfs64): Likewise.
>> I don't like the use of __u64 here - that's a kernel type, not a glibc 
>> one, and glibc headers shouldn't be using it.
>>
> Sure, how about __U64_TYPE? This seems in line with using __SWORD_TYPE
> from <bits/types.h>

Looking at this, I wonder if we need the alignment attribute on the structure at all.  Given that the __field64 macro fields have that alignment attribute, the structure as a whole should also automatically have it, so it seems superfluous.  Does it work on nios2 if you remove the struct alignment directive?

The kernel version of the structure doesn't have any forced alignment on it.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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