Probe for preadv/pwritev in a more macOS-friendly way.
Tom Lane <tgl@sss.pgh.pa.us>
Probe for preadv/pwritev in a more macOS-friendly way. Apple's mechanism for dealing with functions that are available in only some OS versions confuses AC_CHECK_FUNCS, and therefore AC_REPLACE_FUNCS. We can use AC_CHECK_DECLS instead, so long as we enable -Werror=unguarded-availability-new. This allows people compiling for macOS to control whether or not preadv/pwritev are used by setting MACOSX_DEPLOYMENT_TARGET, rather than supplying a back-rev SDK. (Of course, the latter still works, too.) James Hilliard Discussion: https://postgr.es/m/20210122193230.25295-1-james.hilliard1@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +140 −26 |
| configure.ac | modified | +9 −2 |
| src/include/pg_config.h.in | modified | +8 −6 |
| src/include/port/pg_iovec.h | modified | +2 −2 |
| src/tools/msvc/Solution.pm | modified | +2 −2 |
Discussion
- [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX. 24 messages · 2021-01-22 → 2021-07-12