This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64
Hi!
> the trouble is that glibc only does fcntl->fcntl64, it doesn't do any
> other cmd or arg translation. that means users are forced to pick the
> right cmd (FOO or FOO64) that matches the LFS build mode. i.e. they
> can't use FOO w/LFS turned on, and they can't use FOO64 w/LFS turned
> off. otherwise there's a mismatch in the struct flock.
One way to fix that would be to add fcntl32() that does the flock <->
flock64 translation for F_OFD_XXX and calls the generall fcntl()
implementation. Then select between fcntl() and fctnt32() on 32bit
architectures based on _FILE_OFFSET_BITS in the preprocessor in the
fcntl header. That way we wouldn't have to touch the kernel at all.
--
Cyril Hrubis
chrubis@suse.cz