changeset 20949:292cd2a2d600

(sigmask) [POSIX_SIGNALS]: Always define our own version that returns a sigset_t. (sigpause) [POSIX_SIGNALS]: Unconditionally define in terms of sigsuspend. Don't redefine SIGEMPTYMASK. (sys_sigpause): Don't declare. (temp_mask): Don't declare.
author Andreas Schwab <schwab@suse.de>
date Fri, 20 Feb 1998 13:01:10 +0000
parents a9a9a13079b4
children 8555e6a74cb9
files src/syssignal.h
diffstat 1 files changed, 7 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/syssignal.h	Fri Feb 20 13:00:21 1998 +0000
+++ b/src/syssignal.h	Fri Feb 20 13:01:10 1998 +0000
@@ -30,11 +30,13 @@
 
 #define SIGEMPTYMASK (empty_mask)
 #define SIGFULLMASK (full_mask)
-extern sigset_t empty_mask, full_mask, temp_mask;
+extern sigset_t empty_mask, full_mask;
 
 /* POSIX pretty much destroys any possibility of writing sigmask as a
-   macro in standard C.  */
-#ifndef sigmask
+   macro in standard C.  We always define our own version because the
+   predefined macro in Glibc 2.1 is only provided for compatility for old
+   programs that use int as signal mask type.  */
+#undef sigmask
 #ifdef __GNUC__
 #define sigmask(SIG) 				\
   ({						\
@@ -49,15 +51,8 @@
 #endif /* ! defined (__GNUC__) */
 #endif
 
-#ifndef sigpause
-#define sigpause(SIG)    sys_sigpause (SIG)
-#else
-/* If sigpause is predefined, with POSIX_SIGNALS,
-   let's assume it needs this kind of argument.
-   This is true for Glibc 2.1.  */
-#undef SIGEMPTYMASK
-#define SIGEMPTYMASK sigmask (0)
-#endif
+#undef sigpause
+#define sigpause(MASK)    sigsuspend (&(MASK))
 
 #define sigblock(SIG)    sys_sigblock (SIG)
 #define sigunblock(SIG)  sys_sigunblock (SIG)
@@ -74,7 +69,6 @@
 typedef RETSIGTYPE (*signal_handler_t) (/*int*/);
 
 signal_handler_t sys_signal (/*int signal_number, signal_handler_t action*/);
-int      sys_sigpause   (/*sigset_t new_mask*/);
 sigset_t sys_sigblock   (/*sigset_t new_mask*/);
 sigset_t sys_sigunblock (/*sigset_t new_mask*/);
 sigset_t sys_sigsetmask (/*sigset_t new_mask*/);