pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Portability fixes for sigwait.
Date: Thu, 15 Jul 2021 01:50:25 +0000
Message-ID: <E1m3qW9-0001AK-I9@gemulon.postgresql.org> (raw)

Portability fixes for sigwait.

Build farm animals running ancient HPUX and Solaris have a non-standard
sigwait() from draft versions of POSIX, so they didn't like commit
7c09d279.  To avoid the problem in general, only try to use sigwait() if
it's declared by <signal.h> and matches the expected declaration.  To
select the modern declaration on Solaris (even in non-threaded
programs), move -D_POSIX_PTHREAD_SEMANTICS into the right place to
affect all translation units.

Also fix the error checking.  Modern sigwait() doesn't set errno.

Thanks to Tom Lane for help with this.

Discussion: https://postgr.es/m/3187588.1626136248%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5865e064abfbbe11ebfc09881be009c0f69b4dc2

Modified Files
--------------
config/thread_test.c       |  4 ---
configure                  | 75 ++++++++++++++++++++++++++++++++++++++++++----
configure.ac               | 38 +++++++++++++++++++++--
src/bin/psql/command.c     | 13 ++++----
src/bin/psql/startup.c     |  4 +--
src/include/pg_config.h.in |  7 +++++
src/tools/msvc/Solution.pm |  2 ++
7 files changed, 122 insertions(+), 21 deletions(-)



Message-ID: <E1m3qW9-0001AK-I9@gemulon.postgresql.org>
Permalink:  ../E1m3qW9-0001AK-I9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1m3qW9-0001AK-I9@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Portability fixes for sigwait.
  In-Reply-To: <E1m3qW9-0001AK-I9@gemulon.postgresql.org>
  References: <E1m3qW9-0001AK-I9@gemulon.postgresql.org>

* 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