summaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
authorTom Lane2015-08-31 16:55:59 +0000
committerTom Lane2015-08-31 16:56:10 +0000
commita65e086453e0dea5cdd7f9fe9dc6c34d8bfc0f2c (patch)
tree0d84406b458a305c86098816345d2a48c1d5a9d7 /src/include/c.h
parent8f7d044ba842ab3359a8a3190ff2f3aa1de2a6bb (diff)
Remove support for Unix systems without the POSIX signal APIs.
Remove configure's checks for HAVE_POSIX_SIGNALS, HAVE_SIGPROCMASK, and HAVE_SIGSETJMP. These APIs are required by the Single Unix Spec v2 (POSIX 1997), which we generally consider to define our minimum required set of Unix APIs. Moreover, no buildfarm member has reported not having them since 2012 or before, which means that even if the code is still live somewhere, it's untested --- and we've made plenty of signal-handling changes of late. So just take these APIs as given and save the cycles for configure probes for them. However, we can't remove as much C code as I'd hoped, because the Windows port evidently still uses the non-POSIX code paths for signal masking. Since we're largely emulating these BSD-style APIs for Windows anyway, it might be a good thing to switch over to POSIX-like notation and thereby remove a few more #ifdefs. But I'm not in a position to code or test that. In the meantime, we can at least make things a bit more transparent by testing for WIN32 explicitly in these places.
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/c.h b/src/include/c.h
index f5da4676c6f..8163b000df1 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -1051,9 +1051,9 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
/*
* When there is no sigsetjmp, its functionality is provided by plain
* setjmp. Incidentally, nothing provides setjmp's functionality in
- * that case.
+ * that case. We now support the case only on Windows.
*/
-#ifndef HAVE_SIGSETJMP
+#ifdef WIN32
#define sigjmp_buf jmp_buf
#define sigsetjmp(x,y) setjmp(x)
#define siglongjmp longjmp