postgresql/src
Tom Lane 45c5276628 Make safeguard against incorrect flags for fsync more portable.
The existing code assumed that O_RDONLY is defined as 0, but this is
not required by POSIX and is not true on GNU Hurd.  We can avoid
the assumption by relying on O_ACCMODE to mask the fcntl() result.
(Hopefully, all supported platforms define that.)

Author: Michael Banck <mbanck@gmx.net>
Co-authored-by: Samuel Thibault
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/6862e8d1.050a0220.194b8d.76fa@mx.google.com
Discussion: https://postgr.es/m/68480868.5d0a0220.1e214d.68a6@mx.google.com
Backpatch-through: 13
2025-07-01 12:08:20 -04:00
..
backend Make safeguard against incorrect flags for fsync more portable. 2025-07-01 12:08:20 -04:00
bin Run pgperltidy 2025-06-29 21:14:21 -04:00
common Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe_utils Fix incorrect format placeholders 2025-04-25 16:49:30 +02:00
include Fix indentation in pg_numa code 2025-07-01 15:24:19 +02:00
interfaces libpq: Message style improvements 2025-06-26 22:13:53 +02:00
makefiles pgxs.mk: remove unreachable rule for deleting regress.def. 2025-06-20 12:12:29 -04:00
pl Sync typedefs.list with the buildfarm. 2025-06-15 13:04:24 -04:00
port Fix indentation in pg_numa code 2025-07-01 15:24:19 +02:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Run pgperltidy 2025-06-29 21:14:21 -04:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:13:49 -04:00
tools Silence valgrind about pg_numa_touch_mem_if_required 2025-07-01 12:33:29 +02:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
Makefile.shlib Use exported symbols list on macOS for loadable modules as well 2025-06-10 07:04:43 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00