This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251)

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?
> Samuel

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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]