Move our p{read,write}v replacements into their own files.
Thomas Munro <tmunro@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +53 −1 |
| configure.ac | modified | +4 −4 |
| src/backend/storage/file/fd.c | modified | +65 −0 |
| src/include/storage/fd.h | modified | +5 −0 |
| src/port/Makefile | modified | +0 −2 |
| src/port/pread.c | modified | +2 −41 |
| src/port/preadv.c | added | +58 −0 |
| src/port/pwrite.c | modified | +2 −105 |
| src/port/pwritev.c | added | +58 −0 |
| src/tools/msvc/Mkvcbuild.pm | modified | +1 −1 |
Discussion
- pg_preadv() and pg_pwritev() 39 messages · 2020-12-19 → 2021-01-19