summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-12-16 22:55:34 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-12-16 22:55:34 +0000
commitb63b967a7e68c0f157958406aaa78285ba6e5dd7 (patch)
tree45ea441e6bf8d02a747359d7007cd8daf303df2b /src/include
parent52fc0075ab794136f12847971068cbddba297fe4 (diff)
If there is no sigdelset(), define it as a macro.
This removes some duplicate code that recreated the identical workaround when the newer signal API is missing.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/libpq/pqsignal.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h
index cd631c19e24..6061898b36b 100644
--- a/src/include/libpq/pqsignal.h
+++ b/src/include/libpq/pqsignal.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/libpq/pqsignal.h,v 1.34 2009/08/29 19:26:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/libpq/pqsignal.h,v 1.35 2009/12/16 22:55:34 petere Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@@ -26,7 +26,7 @@ extern sigset_t UnBlockSig,
StartupBlockSig;
#define PG_SETMASK(mask) sigprocmask(SIG_SETMASK, mask, NULL)
-#else
+#else /* not HAVE_SIGPROCMASK */
extern int UnBlockSig,
BlockSig,
StartupBlockSig;
@@ -37,7 +37,9 @@ extern int UnBlockSig,
#define PG_SETMASK(mask) pqsigsetmask(*((int*)(mask)))
int pqsigsetmask(int mask);
#endif
-#endif
+
+#define sigdelset(set, signum) (*(set) &= ~(sigmask(signum)))
+#endif /* not HAVE_SIGPROCMASK */
typedef void (*pqsigfunc) (int);