This is the mail archive of the
mailing list for the glibc project.
Re: Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Samuel Thibault <samuel dot thibault at gnu dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 15 Nov 2018 14:04:44 -0800
- Subject: Re: Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)
- References: <20181115012457.ssscem7zfceifykq@function> <20181115012939.il77yr2gxkxyswu6@function> <20181115013648.xcxewlolirj35o3d@function> <firstname.lastname@example.org> <20181115185350.umini454u67gtbco@function> <20181115212752.ojszwnuzcyharlrc@function>
On 15/11/2018 13:27, Samuel Thibault wrote:
> Just for completeness:
> Samuel Thibault, le jeu. 15 nov. 2018 19:53:50 +0100, a ecrit:
>> - __USE_LARGEFILE64 is defined, struct flock is kept 32bits, struct
>> flock64 is available as 64bit variant which can be used either with
>> fcntl() with F_*LK64 variants, or with fcntl64.
> But with fcntl64 you still have to use F_*LK64 variants, F_*LK variants
> still use the 32bit flock structure, right?
For architectures with sizeof off_t equal to sizeof off64_t
(__OFF_T_MATCHES_OFF64_T) it does not really matter. For non-LFS
- POSIX lock advisory: fcntl and fcntl64 will be semantically identical,
meaning that if you can use either F_*LK with flock or F_*LK64 with
- Linux OFD locks: you must use either fcntl with flock *or* fcntl64
with flock64 (the former being a glibc additional support compared to
The fcntl64 was added exactly to handle the Linux requirement where it
supports only LFS variant for OFD locks (even for architecture that
support legacy non-LFS system calls).