summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sigprocmask.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigprocmask.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigprocmask.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
index 3e0719aa7f..7590071eea 100644
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,13 +22,15 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include <bp-checks.h>
 
 #include "kernel-features.h"
 
 
-extern int __syscall_sigprocmask (int, const sigset_t *, sigset_t *);
-extern int __syscall_rt_sigprocmask (int, const sigset_t *, sigset_t *,
-				     size_t);
+extern int __syscall_sigprocmask (int, const sigset_t *__unbounded,
+				  sigset_t *__unbounded);
+extern int __syscall_rt_sigprocmask (int, const sigset_t *__unbounded,
+				     sigset_t *__unbounded, size_t);
 
 /* The variable is shared between all wrappers around signal handling
    functions which have RT equivalents.  The definition is in sigaction.c.  */
@@ -43,7 +45,8 @@ __sigprocmask (how, set, oset)
      sigset_t *oset;
 {
 #if __ASSUME_REALTIME_SIGNALS > 0
-  return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
+  return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
+			 CHECK_SIGSETopt (oset), _NSIG / 8);
 #else
 # ifdef __NR_rt_sigprocmask
   /* First try the RT signals.  */
@@ -52,8 +55,8 @@ __sigprocmask (how, set, oset)
       /* XXX The size argument hopefully will have to be changed to the
 	 real size of the user-level sigset_t.  */
       int saved_errno = errno;
-      int result = INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset,
-				   _NSIG / 8);
+      int result = INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
+				   CHECK_SIGSETopt (oset), _NSIG / 8);
 
       if (result >= 0 || errno != ENOSYS)
 	return result;
@@ -63,7 +66,8 @@ __sigprocmask (how, set, oset)
     }
 # endif
 
-  return INLINE_SYSCALL (sigprocmask, 3, how, set, oset);
+  return INLINE_SYSCALL (sigprocmask, 3, how,
+			 CHECK_SIGSET (set), CHECK_SIGSETopt (oset));
 #endif
 }
 weak_alias (__sigprocmask, sigprocmask)