[glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64
Florian Weimer
fweimer@redhat.com
Thu Aug 18 08:44:00 GMT 2016
On 08/17/2016 09:20 PM, Jeff Layton wrote:
> It is, but it's preferable to unexpected behavior at runtime. I think
> it's entirely reasonable to require large file offsets in order to use
> OFD locks, but I'm willing to be convinced otherwise if there are use
> cases that you know of that this will break.
I have thought about it some more and I agree that removing the
definitions for !64-bit is a viable course of action.
We should deprecate F_SETLK64 and struct lock64, too, and document that
you should use _FILE_OFFSET_BITS == 64 if you need such locks. That,
and make fcntl type-safe (for both C and C++ with sufficiently recent GCC).
Florian
More information about the Libc-alpha
mailing list