From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Portability fixes for sigwait. |
Date: | 2021-07-15 01:50:25 |
Message-ID: | E1m3qW9-0001AK-I9@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2021-07-15 01:52:04 | Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command. |
Previous Message | Peter Eisentraut | 2021-07-14 22:15:23 | pgsql: Fix some nonstandard C code indentation in grammar file |