Loading...
gen/sigsetops.c Libc-262.3.2 Libc-498
--- Libc/Libc-262.3.2/gen/sigsetops.c
+++ Libc/Libc-498/gen/sigsetops.c
@@ -2,8 +2,6 @@
  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
@@ -65,6 +63,7 @@
 #undef sigdelset
 #undef sigismember
 
+int
 sigemptyset(set)
 	sigset_t *set;
 {
@@ -72,6 +71,7 @@
 	return (0);
 }
 
+int
 sigfillset(set)
 	sigset_t *set;
 {
@@ -79,6 +79,7 @@
 	return (0);
 }
 
+int
 sigaddset(set, signo)
 	sigset_t *set;
 	int signo;
@@ -87,10 +88,13 @@
 		errno = EINVAL;
 		return(-1);
 	}
+	if (signo == 0)
+		return(0);
 	*set |= sigmask(signo);
 	return (0);
 }
 
+int
 sigdelset(set, signo)
 	sigset_t *set;
 	int signo;
@@ -99,10 +103,13 @@
 		errno = EINVAL;
 		return(-1);
 	}
+	if (signo == 0)
+		return(0);
 	*set &= ~sigmask(signo);
 	return (0);
 }
 
+int
 sigismember(set, signo)
 	const sigset_t *set;
 	int signo;
@@ -111,5 +118,7 @@
 		errno = EINVAL;
 		return(-1);
 	}
-	return ((*set & ~sigmask(signo)) != 0);
+	if (signo == 0)
+		return(0);
+	return ((*set & sigmask(signo)) != 0);
 }