* SUCH DAMAGE.
*/
-#if defined(VARIANT_CANCELABLE) || defined(VARIANT_PRE1050)
-#undef __DARWIN_NON_CANCELABLE
-#endif /* VARIANT_CANCELABLE */
+#if (defined(VARIANT_CANCELABLE) || defined(VARIANT_PRE1050)) && __DARWIN_NON_CANCELABLE != 0
+#error cancellable call vs. __DARWIN_NON_CANCELABLE mismatch
+#endif
#ifdef VARIANT_DARWINEXTSN
#define _DARWIN_UNLIMITED_SELECT
__weak_reference(__pselect, pselect);
+// Returns -1 and sets errno in contrast to pthread_sigmask which returns errno
+extern int __pthread_sigmask(int, const sigset_t *, sigset_t *);
+
/*
* Emulate the POSIX 1003.1g-2000 `pselect' interface. This is the
* same as the traditional BSD `select' function, except that it uses
tvp = 0;
if (mask != 0) {
- rv = _sigprocmask(SIG_SETMASK, mask, &omask);
+ rv = __pthread_sigmask(SIG_SETMASK, mask, &omask);
if (rv != 0)
return rv;
}
rv = _select(count, rfds, wfds, efds, tvp);
if (mask != 0) {
sverrno = errno;
- _sigprocmask(SIG_SETMASK, &omask, (sigset_t *)0);
+ __pthread_sigmask(SIG_SETMASK, &omask, (sigset_t *)0);
errno = sverrno;
}