Loading...
--- Libc/Libc-1725.40.4/include/signal.h
+++ Libc/Libc-583/include/signal.h
@@ -59,14 +59,13 @@
#define _USER_SIGNAL_H
#include <sys/cdefs.h>
-#include <_bounds.h>
#include <_types.h>
#include <sys/signal.h>
-#include <sys/_pthread/_pthread_types.h>
-#include <sys/_pthread/_pthread_t.h>
-
-_LIBC_SINGLE_BY_DEFAULT()
+#ifndef _PTHREAD_T
+typedef __darwin_pthread_t pthread_t;
+#define _PTHREAD_T
+#endif
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
extern __const char *__const sys_signame[NSIG];
@@ -79,7 +78,7 @@
#ifndef _ANSI_SOURCE
__BEGIN_DECLS
-void (* _Nullable bsd_signal(int, void (* _Nullable)(int)))(int);
+void (*bsd_signal(int, void (*)(int)))(int);
//Begin-Libc
#ifndef LIBC_ALIAS_KILL
//End-Libc
@@ -114,10 +113,10 @@
//Begin-Libc
#ifndef LIBC_ALIAS_SIGALTSTACK
//End-Libc
-int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack);
//Begin-Libc
#else /* LIBC_ALIAS_SIGALTSTACK */
-int sigaltstack(const stack_t * __restrict, stack_t * __restrict) LIBC_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int sigaltstack(const stack_t * __restrict, stack_t * __restrict) LIBC_ALIAS(sigaltstack);
#endif /* !LIBC_ALIAS_SIGALTSTACK */
//End-Libc
int sigdelset(sigset_t *, int);
@@ -139,7 +138,7 @@
int sigpending(sigset_t *);
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
int sigrelse(int);
-void (* _Nullable sigset(int, void (* _Nullable)(int)))(int);
+void (*sigset(int, void (*)(int)))(int);
//Begin-Libc
#ifndef LIBC_ALIAS_SIGSUSPEND
//End-Libc
@@ -158,10 +157,8 @@
int sigwait(const sigset_t * __restrict, int * __restrict) LIBC_ALIAS_C(sigwait);
#endif /* !LIBC_ALIAS_SIGWAIT */
//End-Libc
-#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE >= 200809L || defined(_DARWIN_C_SOURCE)
-void psignal(int, const char *);
-#endif /* (!_POSIX_C_SOURCE || _POSIX_C_SOURCE >= 200809L || _DARWIN_C_SOURCE) */
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+void psignal(unsigned int, const char *);
int sigblock(int);
int sigsetmask(int);
int sigvec(int, struct sigvec *, struct sigvec *);
@@ -169,11 +166,16 @@
__END_DECLS
/* List definitions after function declarations, or Reiser cpp gets upset. */
-__header_always_inline int
+#if defined(__i386__) || defined(__x86_64__)
+/* The left shift operator on intel is modulo 32 */
+static __inline int
__sigbits(int __signo)
{
return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1));
}
+#else /* !__i386__ && !__x86_64__ */
+#define __sigbits(signo) (1 << ((signo) - 1))
+#endif /* __i386__ || __x86_64__ */
#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0)
#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0)