glibc/sysdeps/unix/sysv/linux/powerpc/bits
Aurelien Jarno 434bf72a94 io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64
Commit 5f828ff824 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
powerpc64") fixed an issue with the value of the lock constants on
powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
changing the value when using __USE_FILE_OFFSET64 causing an API change.

Fix that by also checking that define, restoring the pre
4d0fe291ae commit values:

Default values:
- F_GETLK: 5
- F_SETLK: 6
- F_SETLKW: 7

With -D_FILE_OFFSET_BITS=64:
- F_GETLK: 12
- F_SETLK: 13
- F_SETLKW: 14

At the same time, it has been noticed that there was no test for io lock
with __USE_FILE_OFFSET64, so just add one.

Tested on x86_64-linux-gnu, i686-linux-gnu and
powerpc64le-unknown-linux-gnu.

Resolves: BZ #30804.
Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2023-09-07 21:56:31 +02:00
..
types Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
environments.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fcntl.h io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64 2023-09-07 21:56:31 +02:00
ioctl-types.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ipc-perm.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mman.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ppc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
procfs.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
pthread_stack_min.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rseq.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigstack.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
socket-constants.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
struct_stat.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-baud.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_cc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_cflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_iflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_lflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_oflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-misc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
timesize.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
typesizes.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize.h