pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.
Date: Tue, 19 Jan 2021 12:29:36 -0500
Message-ID: <484263.1611077376@sss.pgh.pa.us> (raw)
In-Reply-To: <20210119165435.45411-1-james.hilliard1@gmail.com>
References: <20210119165435.45411-1-james.hilliard1@gmail.com>

James Hilliard <james.hilliard1@gmail.com> writes:
> Fixes:
> fd.c:3661:10: warning: 'pwritev' is only available on macOS 11.0 or newer [-Wunguarded-availability-new]

It's still missing preadv, and it still has nonzero chance of breaking
successful detection of pwritev on platforms other than yours, and it's
still really ugly.

But the main reason I don't want to go this way is that I don't think
it'll stop with preadv/pwritev.  If we make it our job to build
successfully even when using the wrong SDK version for the target
platform, we're going to be in for more and more pain with other
kernel APIs.

We could, of course, do what Apple wants us to do and try to build
executables that work across versions.  I do not intend to put up
with the sort of invasive, error-prone source-code-level runtime test
they recommend ... but given that there is weak linking involved here,
I wonder if there is a way to silently sub in src/port/pwritev.c
when executing on a pre-11 macOS, by dint of marking it a weak
symbol?

			regards, tom lane





view thread (30+ messages)  latest in thread

Message-ID: <484263.1611077376@sss.pgh.pa.us>
Permalink:  ../484263.1611077376@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/484263.1611077376@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, james.hilliard1@gmail.com, s.shinderuk@postgrespro.ru, thomas.munro@gmail.com
  Subject: Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.
  In-Reply-To: <484263.1611077376@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox