diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-07-15 12:23:47 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-07-15 12:34:31 +1200 |
commit | 5865e064abfbbe11ebfc09881be009c0f69b4dc2 (patch) | |
tree | f5ab7b320efbc4892864b83377a2f13b3783f977 /config | |
parent | 9aa8268faa0ec2904f55e85be5ec7b365c98edd1 (diff) | |
download | postgresql-5865e064abfbbe11ebfc09881be009c0f69b4dc2.tar.gz |
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
Diffstat (limited to 'config')
-rw-r--r-- | config/thread_test.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/config/thread_test.c b/config/thread_test.c index 784f4fe8ce..e2a9e62f49 100644 --- a/config/thread_test.c +++ b/config/thread_test.c @@ -43,10 +43,6 @@ #include <winsock2.h> #endif -/* Test for POSIX.1c 2-arg sigwait() and fail on single-arg version */ -#include <signal.h> -int sigwait(const sigset_t *set, int *sig); - #define TEMP_FILENAME_1 "thread_test.1" #define TEMP_FILENAME_2 "thread_test.2" |