This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: struct statfs/statfs64 in linux-generic
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: Chung-Lin Tang <cltang at codesourcery dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 14 Nov 2013 13:28:38 -0500
- Subject: Re: struct statfs/statfs64 in linux-generic
- Authentication-results: sourceware.org; auth=none
- References: <52774A2F dot 5010505 at codesourcery dot com> <527BF01B dot 9080704 at tilera dot com> <527F42AF dot 8060204 at codesourcery dot com> <Pine dot LNX dot 4 dot 64 dot 1311111746460 dot 18663 at digraph dot polyomino dot org dot uk> <5283357D dot 2050205 at codesourcery dot com> <Pine dot LNX dot 4 dot 64 dot 1311131258150 dot 18987 at digraph dot polyomino dot org dot uk> <528452BE dot 6020904 at codesourcery dot com>
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