Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.
Date
Msg-id 522691.1611090008@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.  (James Hilliard <james.hilliard1@gmail.com>)
List pgsql-hackers
James Hilliard <james.hilliard1@gmail.com> writes:
> I also don't think this is a weak symbol.

> From the header file it is not have __attribute__((weak_import)):
> ssize_t pwritev(int, const struct iovec *, int, off_t)
> __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0),
> watchos(7.0), tvos(14.0));

See the other thread.  I found by looking at the asm output that
what __API_AVAILABLE actually does is cause the compiler to emit
a ".weak_reference" directive when calling a function it thinks
might not be available.  So there's some sort of weak linking
going on, though it's certainly possible that it's not shaped
in a way that'd help us do this the way we'd prefer.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Next
From: "Joel Jacobson"
Date:
Subject: Re: Add primary keys to system catalogs