This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org, OndÅej BÃlka <neleai at seznam dot cz>, Paul Eggert <eggert at cs dot ucla dot edu>, Denis Obrezkov <reprofy at etersoft dot ru>
- Date: Fri, 14 Mar 2014 01:44:30 -0400
- Subject: Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- Authentication-results: sourceware.org; auth=none
- References: <1393521776-1102-1-git-send-email-reprofy at etersoft dot ru> <26837730 dot jZzKCPMtpS at vapier> <20140313092056 dot GX184 at brightrain dot aerifal dot cx> <6414452 dot 34f68jlARn at vapier>
On Thu, Mar 13, 2014 at 05:28:22PM -0400, Mike Frysinger wrote:
> On Thu 13 Mar 2014 05:20:57 Rich Felker wrote:
> > On Thu, Mar 13, 2014 at 05:16:08AM -0400, Mike Frysinger wrote:
> > > diff --git a/io/Makefile b/io/Makefile
> > > index 8a6562e..77a1907 100644
> > > --- a/io/Makefile
> > > +++ b/io/Makefile
> > > @@ -99,7 +99,7 @@ CFLAGS-fallocate.c = -fexceptions
> > >
> > > CFLAGS-fallocate64.c = -fexceptions
> > > CFLAGS-sync_file_range.c = -fexceptions
> > >
> > > -CFLAGS-test-stat.c = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
> > > +CFLAGS-test-stat.c = -U_FILE_OFFSET_BITS -D_FILE_OFFSET_BITS=64
> > > -D_LARGEFILE64_SOURCE
> >
> > If this happens to work, it's purely by chance/redundancy. -U
> > overrides all -D for the same identifier, even subsequent ones.
>
> if your compiler driver is unreasonable and isn't sane, then i'm not sure how
> that's our problem. we're already relying on sane behavior -- see how
> _FORTIFY_SOURCE is used in the tree.
> -mike
I'm merely citing the standards-required behavior. If gcc doesn't
follow this, then I suppose this requires a workaround in the 'c99'
wrapper shell scripts used for providing the c99 utility via gcc. But
that's off-topic.
On the other hand, I still think it is confusing to have the makefile
appearing to rely on gcc-specific behavior that contradicts the
standards, especially when the same behavior would be achieved
unambiguously without the -D (since the patched features.h would treat
-U as implying 64-bit).
Rich