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: "Carlos O'Donell" <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Wed, 20 May 2015 12:21:02 -0400
- 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> <555CAF0E dot 5090408 at redhat dot com>
On 05/20/2015 11:58 AM, Florian Weimer wrote:
> On 05/20/2015 05:20 PM, Szabolcs Nagy wrote:
>> the generic definition of struct stat on linux miss the
>> st_atim, st_mtim and st_ctim members when _POSIX_C_SOURCE
>> is defined (affects at least aarch64 and arm).
>
> Does this need to be conditional on the POSIX version?
>
This is already done by features.h.
e.g.
#if (_POSIX_C_SOURCE - 0) >= 200809L
# define __USE_XOPEN2K8 1
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
#endif
Which should define __USE_XOPEN2K8 as expected.
My worry is that you've changed the semantics since __USE_MISC
was previously used.
Cheers,
Carlos.