]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Portability fixes for sigwait.
authorThomas Munro <tmunro@postgresql.org>
Thu, 15 Jul 2021 00:23:47 +0000 (12:23 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 15 Jul 2021 00:34:31 +0000 (12:34 +1200)
commit5865e064abfbbe11ebfc09881be009c0f69b4dc2
treef5ab7b320efbc4892864b83377a2f13b3783f977
parent9aa8268faa0ec2904f55e85be5ec7b365c98edd1
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
config/thread_test.c
configure
configure.ac
src/bin/psql/command.c
src/bin/psql/startup.c
src/include/pg_config.h.in
src/tools/msvc/Solution.pm