pgsql: Portability fixes for sigwait. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Portability fixes for sigwait.
Date
Msg-id E1m3qW9-0001AK-I9@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix some nonstandard C code indentation in grammar file
Next
From: Thomas Munro
Date:
Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.