about summary refs log tree commit diff
path: root/src/signal/sigisemptyset.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-12 00:00:30 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-12 00:00:30 -0400
commitfb80e047cc7d0b900445ca6ce38f10199dafd98b (patch)
tree9f44588e16683312aa67411290c5605590310c0a /src/signal/sigisemptyset.c
parentce17ea6f2cae0c0c1c14dac5c7c7330f2503d069 (diff)
downloadmusl-fb80e047cc7d0b900445ca6ce38f10199dafd98b.tar.gz
musl-fb80e047cc7d0b900445ca6ce38f10199dafd98b.tar.xz
musl-fb80e047cc7d0b900445ca6ce38f10199dafd98b.zip
implement gnu sigisemptyset
Diffstat (limited to 'src/signal/sigisemptyset.c')
-rw-r--r--src/signal/sigisemptyset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/signal/sigisemptyset.c b/src/signal/sigisemptyset.c
new file mode 100644
index 00000000..e2410514
--- /dev/null
+++ b/src/signal/sigisemptyset.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <signal.h>
+#include <string.h>
+
+int sigisemptyset(const sigset_t *set)
+{
+	static const sigset_t zeroset;
+	return !memcmp(set, &zeroset, 8);
+}