summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/ncurses/base/sigaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base/sigaction.c')
-rw-r--r--contrib/ncurses/ncurses/base/sigaction.c64
1 files changed, 23 insertions, 41 deletions
diff --git a/contrib/ncurses/ncurses/base/sigaction.c b/contrib/ncurses/ncurses/base/sigaction.c
index 8ba8629..36442e0 100644
--- a/contrib/ncurses/ncurses/base/sigaction.c
+++ b/contrib/ncurses/ncurses/base/sigaction.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,37 +29,29 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
****************************************************************************/
-#include <curses.priv.h>
-
-#include <SigAction.h>
-
/* This file provides sigaction() emulation using sigvec() */
/* Use only if this is non POSIX system */
-#if !HAVE_SIGACTION && HAVE_SIGVEC
+MODULE_ID("$Id: sigaction.c,v 1.14 2003/12/07 01:06:52 tom Exp $")
-MODULE_ID("$Id: sigaction.c,v 1.13 2002/05/18 19:56:26 tom Exp $")
-
-NCURSES_EXPORT(int)
-sigaction
-(int sig, sigaction_t * sigact, sigaction_t * osigact)
+static int
+_nc_sigaction(int sig, sigaction_t * sigact, sigaction_t * osigact)
{
return sigvec(sig, sigact, osigact);
}
-NCURSES_EXPORT(int)
-sigemptyset
-(sigset_t * mask)
+static int
+_nc_sigemptyset(sigset_t * mask)
{
*mask = 0;
return 0;
}
-NCURSES_EXPORT(int)
-sigprocmask
-(int mode, sigset_t * mask, sigset_t * omask)
+static int
+_nc_sigprocmask(int mode, sigset_t * mask, sigset_t * omask)
{
sigset_t current = sigsetmask(0);
@@ -77,41 +69,31 @@ sigprocmask
return 0;
}
-NCURSES_EXPORT(int)
-sigsuspend(sigset_t * mask)
+static int
+_nc_sigaddset(sigset_t * mask, int sig)
{
- return sigpause(*mask);
+ *mask |= sigmask(sig);
+ return 0;
}
-NCURSES_EXPORT(int)
-sigdelset
-(sigset_t * mask, int sig)
+/* not used in lib_tstp.c */
+#if 0
+static int
+_nc_sigsuspend(sigset_t * mask)
{
- *mask &= ~sigmask(sig);
- return 0;
+ return sigpause(*mask);
}
-NCURSES_EXPORT(int)
-sigaddset
-(sigset_t * mask, int sig)
+static int
+_nc_sigdelset(sigset_t * mask, int sig)
{
- *mask |= sigmask(sig);
+ *mask &= ~sigmask(sig);
return 0;
}
-NCURSES_EXPORT(int)
-sigismember
-(sigset_t * mask, int sig)
+static int
+_nc_sigismember(sigset_t * mask, int sig)
{
return (*mask & sigmask(sig)) != 0;
}
-
-#else
-extern
-NCURSES_EXPORT(void)
-_nc_sigaction(void); /* quiet's gcc warning */
-NCURSES_EXPORT(void)
-_nc_sigaction(void)
-{
-} /* nonempty for strict ANSI compilers */
#endif
OpenPOWER on IntegriCloud