git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 71f5dc6) | patch
Remove dead pread and pwrite replacement code.
Thu, 4 Aug 2022 21:42:31 +0000 (09:42 +1200)
Thu, 4 Aug 2022 21:49:21 +0000 (09:49 +1200)
commit cf112c122060568aa06efe4e6e6fb9b2dd4f1090
Remove dead pread and pwrite replacement code.

pread() and pwrite() are in SUSv2, and all targeted Unix systems have
them.

Previously, we defined pg_pread and pg_pwrite to emulate these function
with lseek() on old Unixen. The names with a pg_ prefix were a reminder
of a portability hazard: they might change the current file position.
That hazard is gone, so we can drop the prefixes.

Since the remaining replacement code is Windows-only, move it into
src/port/win32p{read,write}.c, and move the declarations into
src/include/port/win32_port.h.

No need for vestigial HAVE_PREAD, HAVE_PWRITE macros as they were only
used for declarations in port.h which have now moved into win32_port.h.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Greg Stark <stark@mit.edu>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
23 files changed:
configure diff | blob | blame | history
configure.ac diff | blob | blame | history
contrib/pg_stat_statements/pg_stat_statements.c diff | blob | blame | history
src/backend/access/heap/rewriteheap.c diff | blob | blame | history
src/backend/access/transam/slru.c diff | blob | blame | history
src/backend/access/transam/xlog.c diff | blob | blame | history
src/backend/access/transam/xlogreader.c diff | blob | blame | history
src/backend/access/transam/xlogrecovery.c diff | blob | blame | history
src/backend/replication/basebackup.c diff | blob | blame | history
src/backend/replication/walreceiver.c diff | blob | blame | history
src/backend/storage/file/fd.c diff | blob | blame | history
src/backend/utils/init/miscinit.c diff | blob | blame | history
src/bin/pg_test_fsync/pg_test_fsync.c diff | blob | blame | history
src/include/access/xlogreader.h diff | blob | blame | history
src/include/pg_config.h.in diff | blob | blame | history
src/include/port.h diff | blob | blame | history
src/include/port/win32_port.h diff | blob | blame | history
src/port/preadv.c diff | blob | blame | history
src/port/pwritev.c diff | blob | blame | history
src/port/win32pread.c [moved from src/port/pread.c with 61% similarity] diff | blob | blame | history
src/port/win32pwrite.c [moved from src/port/pwrite.c with 59% similarity] diff | blob | blame | history
src/tools/msvc/Mkvcbuild.pm diff | blob | blame | history
src/tools/msvc/Solution.pm diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /