From 6599da043e22e96ac830fb50a61c1b6d95d1b142 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 21 Aug 1997 18:57:35 -0400 Subject: Initial revision From-SVN: r14877 --- libiberty/sigsetmask.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 libiberty/sigsetmask.c (limited to 'libiberty/sigsetmask.c') diff --git a/libiberty/sigsetmask.c b/libiberty/sigsetmask.c new file mode 100644 index 0000000..2a09e6a --- /dev/null +++ b/libiberty/sigsetmask.c @@ -0,0 +1,30 @@ +/* Version of sigsetmask.c + Written by Steve Chamberlain (sac@cygnus.com). + Contributed by Cygnus Support. + This file is in the public doamin. */ + +/* Set the current signal mask to the set provided, and return the + previous value */ + +#define _POSIX_SOURCE +#include +/* Including seems to be needed by ISC. */ +#include +#include + +#ifdef SIG_SETMASK +int +DEFUN(sigsetmask,(set), + int set) +{ + sigset_t new; + sigset_t old; + + sigemptyset (&new); + if (set != 0) { + abort(); /* FIXME, we don't know how to translate old mask to new */ + } + sigprocmask(SIG_SETMASK, &new, &old); + return 1; /* FIXME, we always return 1 as old value. */ +} +#endif -- cgit v1.1