This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ 18234] struct stat is not posix conform
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Wed, 20 May 2015 18:55:02 +0100
- Subject: Re: [PATCH][BZ 18234] struct stat is not posix conform
- Authentication-results: sourceware.org; auth=none
- References: <555CA657 dot 2050300 at arm dot com> <555CB539 dot 4090208 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1505201627430 dot 23246 at digraph dot polyomino dot org dot uk>
On 20/05/15 17:44, Joseph Myers wrote:
> Most widely-used cases use __USE_XOPEN2K8. The exceptions are: toplevel
> bits/stat.h (not used in fact) doesn't have the timespec members;
> sysdeps/nacl/bits/stat.h uses __USE_MISC || __USE_XOPEN2K8; as discussed,
> linux/generic uses __USE_MISC; linux/ia64 uses __USE_MISC;
> linux/microblaze uses __USE_MISC.
>
> So, I think a change to use just __USE_XOPEN2K8 is most appropriate. This
> would fix bugs with the elements not being made available when they should
> be. The default API level includes __USE_XOPEN2K8. If __USE_MISC is
> defined, so is __USE_XOPEN2K8: __USE_MISC is only defined when
> _DEFAULT_SOURCE is defined (explicitly or implicitly), and _DEFAULT_SOURCE
> implies __USE_XOPEN2K8. So __USE_MISC || __USE_XOPEN2K8 is entirely
> redundant and means the same as __USE_XOPEN2K8.
>
> Thus: fix nacl, linux/generic, linux/ia64 and linux/microblaze to use
> __USE_XOPEN2K8 here (all in one patch, and the bug in Bugzilla might
> reasonably be rescoped to cover all those cases).
>
ok,
i guess it's ok for consistency if i fix struct stat64
too to use __USE_XOPEN2K8.
i will run some tests and come back with a patch
> linux/alpha does its own more complicated thing with a macro __ST_TIME; I
> see no real reason for one architecture to do things differently from all
> the test, but also no reason to change it for this bug since it's already
> using __USE_XOPEN2K8.
>
> -- Joseph S. Myers joseph@codesourcery.com
>