Move our p{read,write}v replacements into their own files

Enterprise / PostgreSQL - Thomas Munro [postgresql.org] - 13 January 2021 22:16 UTC

macOS's ranlib issued a warning about an empty pread.o file with the previous arrangement, on systems new enough to require no replacement functions. Let's go back to using configure's AC_REPLACE_FUNCS system to build and include each .o in the library only if it's needed, which requires moving the *v() functions to their own files.

Also move the _with_retry() wrapper to a more permanent home.

0d56acfbaa Move our p{read,write}v replacements into their own files.
configure | 54 ++++++++++++++++++++-
configure.ac | 8 ++--
src/backend/storage/file/fd.c | 65 +++++++++++++++++++++++++
src/include/storage/fd.h | 5 ++
src/port/Makefile | 2 -
src/port/pread.c | 43 +----------------
src/port/preadv.c | 58 +++++++++++++++++++++++
src/port/pwrite.c | 107 +-----------------------------------------
src/port/pwritev.c | 58 +++++++++++++++++++++++
src/tools/msvc/Mkvcbuild.pm | 2 +-
10 files changed, 248 insertions(+), 154 deletions(-)

Upstream: git.postgresql.org


  • Share