This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Patch: Convert linux-generic to use <bits/fcntl-linux.h>
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: <libc-ports at sourceware dot org>, Andreas Jaeger <aj at suse dot com>, libc-alpha<libc-alpha at sourceware dot org>
- Date: Wed, 24 Oct 2012 16:45:59 -0400
- Subject: Re: Patch: Convert linux-generic to use <bits/fcntl-linux.h>
- References: <50883C05.5090807@suse.com> <508841FA.4060104@tilera.com> <508849BF.50205@suse.com> <201210241632.20908.vapier@gentoo.org>
On 10/24/2012 4:32 PM, Mike Frysinger wrote:
> On Wednesday 24 October 2012 16:04:15 Andreas Jaeger wrote:
>> On 10/24/2012 09:31 PM, Chris Metcalf wrote:
>>> Does it make sense to move the O_LARGEFILE definition to
>>> bits/fcntl-linux.h instead, i.e. if __O_LARGEFILE is not defined,
>>> provide a definition that's conditional on _WORDSIZE? That seems like a
>>> more natural default, particularly as more platforms will be 64-bit with
>>> time and thus want zero for O_LARGEFILE. <bits/wordsize.h> could either
>>> be unconditionally included, or just included ifndef __O_LARGEFILE.
>> We could have:
>> #ifdef __USE_LARGEFILE64
>> # if __WORDSIZE == 64
>> # define O_LARGEFILE 0
>> # else
>> # define O_LARGEFILE __O_LARGEFILE
>> # endif
>> #endif
> if i'm reading mips' fcntl.h correctly, i don't think that'll work. you'd
> have to make this the __O_LARGEFILE default rather than O_LARGEFILE. their
> 64bit abis are kind of the suck :/.
> -mike
Yes, I think this default definition should be up with the other __O_xxx
definitions and define __O_LARGEFILE if it's not defined. This feels more
consistent with how the other platform defaults are handled. It also is
less hairy since the __USE_LARGEFILE test for defining O_LARGEFILE is
separated from the _WORDSIZE test for defining __O_LARGEFILE.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com