pgsql: Portability fixes for sigwait.
pgsql: Portability fixes for sigwait.
От:
Thomas Munro <tmunro@postgresql.org>
Дата:
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 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(-)