pgsql: Probe for preadv/pwritev in a more macOS-friendly way.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Probe for preadv/pwritev in a more macOS-friendly way.
Date: 2021-07-12 23:17:53
Message-ID: E1m35BR-00063Z-Hl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e75da4f1b6c63523021e550f1a92c67d2b8a92fb

Modified Files
--------------
configure | 166 +++++++++++++++++++++++++++++++++++++-------
configure.ac | 11 ++-
src/include/pg_config.h.in | 14 ++--
src/include/port/pg_iovec.h | 4 +-
src/tools/msvc/Solution.pm | 4 +-
5 files changed, 161 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-07-12 23:53:32 pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Previous Message Tom Lane 2021-07-12 21:01:55 pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().