Patch: Convert linux-generic to use <bits/fcntl-linux.h>

Chris Metcalf cmetcalf@tilera.com
Wed Oct 24 19:31:00 GMT 2012


On 10/24/2012 3:05 PM, Andreas Jaeger wrote:
> Here's a patch for linux-generic to use <bits/fcntl-linux.h>.
> The patch is also part of my git branch aj/shared-linux-fcntl.

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.

Likewise, it might make sense to take the linux-generic version of struct
flock/flock64 into bits/fcntl-linux.h, with an "#ifndef __struct_flock" or
equivalent so that platforms with variant definitions of those structures
can provide them.

This would leave us in the natural-seeming position of having linux-generic
use the generic Linux version of fcntl.h with no customizations :-)

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com



More information about the Libc-ports mailing list