X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fsignal.h;h=1014440d45d4ba159a3424b901cbba636e9d75c8;hp=7f30be3368063c1b2b3f92f354275a7b7c3fd197;hb=1701e4f3d46b14c4c4be8a46e64f8eaf15a5c061;hpb=81a5577a860b1d320239a84c84266e4d7045f450 diff --git a/include/signal.h b/include/signal.h index 7f30be33..1014440d 100644 --- a/include/signal.h +++ b/include/signal.h @@ -5,8 +5,11 @@ extern "C" { #endif +#include + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) #ifdef _GNU_SOURCE #define __siginfo siginfo @@ -45,7 +48,7 @@ extern "C" { #define FPE_INTOVF 2 #define FPE_FLTDIV 3 #define FPE_FLTOVF 4 -#define FPE_FLTUNT 5 +#define FPE_FLTUND 5 #define FPE_FLTRES 6 #define FPE_FLTINV 7 #define FPE_FLTSUB 8 @@ -80,7 +83,7 @@ struct sigaction { } __sa_handler; sigset_t sa_mask; int sa_flags; - void (*__sa_restorer)(void); + void (*sa_restorer)(void); }; #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction @@ -164,16 +167,16 @@ int sigaddset(sigset_t *, int); int sigdelset(sigset_t *, int); int sigismember(const sigset_t *, int); -int sigprocmask(int, const sigset_t *, sigset_t *); +int sigprocmask(int, const sigset_t *__restrict, sigset_t *__restrict); int sigsuspend(const sigset_t *); -int sigaction(int, const struct sigaction *, struct sigaction *); +int sigaction(int, const struct sigaction *__restrict, struct sigaction *__restrict); int sigpending(sigset_t *); -int sigwait(const sigset_t *, int *); -int sigwaitinfo(const sigset_t *, siginfo_t *); -int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *); +int sigwait(const sigset_t *__restrict, int *__restrict); +int sigwaitinfo(const sigset_t *__restrict, siginfo_t *__restrict); +int sigtimedwait(const sigset_t *__restrict, siginfo_t *__restrict, const struct timespec *__restrict); int sigqueue(pid_t, int, const union sigval); -int pthread_sigmask(int, const sigset_t *, sigset_t *); +int pthread_sigmask(int, const sigset_t *__restrict, sigset_t *__restrict); int pthread_kill(pthread_t, int); void psiginfo(const siginfo_t *, const char *); @@ -183,7 +186,7 @@ void psignal(int, const char *); #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) int killpg(pid_t, int); -int sigaltstack(const stack_t *, stack_t *); +int sigaltstack(const stack_t *__restrict, stack_t *__restrict); int sighold(int); int sigignore(int); int siginterrupt(int, int); @@ -204,6 +207,10 @@ void (*sigset(int, void (*)(int)))(int); #define SIGSTKSZ 8192 #endif +#ifdef _BSD_SOURCE +typedef void (*sig_t)(int); +#endif + #ifdef _GNU_SOURCE typedef void (*sighandler_t)(int); void (*bsd_signal(int, void (*)(int)))(int);