Move our p{read,write}v replacements into their own files.
authorThomas Munro <tmunro@postgresql.org>
Wed, 13 Jan 2021 22:10:24 +0000 (11:10 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 13 Jan 2021 22:16:59 +0000 (11:16 +1300)
commit0d56acfbaa799553c0c6ea350fd6e68d81025994
treebff95bba3a6ba07ae52d2ce559dde0755e82a3eb
parent5a6f9bce8dabd371bdb4e3db5dda436f7f0a680f
Move our p{read,write}v replacements into their own files.

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.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1283127.1610554395%40sss.pgh.pa.us
configure
configure.ac
src/backend/storage/file/fd.c
src/include/storage/fd.h
src/port/Makefile
src/port/pread.c
src/port/preadv.c [new file with mode: 0644]
src/port/pwrite.c
src/port/pwritev.c [new file with mode: 0644]
src/tools/msvc/Mkvcbuild.pm