diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-14 20:33:54 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-14 20:33:54 -0500 |
commit | 1322cb82a33a2a59e75937911d910dabc48e9af9 (patch) | |
tree | 2bf15a7623018a27a33c7a7e2b69b5e45f28f803 /include/signal.h | |
parent | c316b284456e8b8d5f6e2ff18ece9c15b60033c7 (diff) | |
download | musl-1322cb82a33a2a59e75937911d910dabc48e9af9.tar.gz musl-1322cb82a33a2a59e75937911d910dabc48e9af9.tar.xz musl-1322cb82a33a2a59e75937911d910dabc48e9af9.zip |
header cleanup, conformance fixes - signals
Diffstat (limited to 'include/signal.h')
-rw-r--r-- | include/signal.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/include/signal.h b/include/signal.h index 540236a5..d69419e3 100644 --- a/include/signal.h +++ b/include/signal.h @@ -5,6 +5,9 @@ extern "C" { #endif +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) + #define __NEED_size_t #define __NEED_pid_t #define __NEED_uid_t @@ -17,8 +20,6 @@ extern "C" { #include <bits/alltypes.h> -typedef int sig_atomic_t; - struct sigaction { union { @@ -53,12 +54,7 @@ int __libc_current_sigrtmax(void); #define SIGRTMIN (__libc_current_sigrtmin()) #define SIGRTMAX (__libc_current_sigrtmax()) -void (*signal(int, void (*)(int)))(int); -void (*bsd_signal(int, void (*)(int)))(int); int kill(pid_t, int); -int killpg(pid_t, int); -int raise(int); -int sigpause(int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); @@ -75,22 +71,32 @@ int sigwaitinfo(const sigset_t *, siginfo_t *); int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *); int sigqueue(pid_t, int, const union sigval); -int siginterrupt(int, int); +int pthread_sigmask(int, const sigset_t *, sigset_t *); +int pthread_kill(pthread_t, int); -int sigaltstack(const stack_t *, stack_t *); +#endif +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +int killpg(pid_t, int); +int sigaltstack(const stack_t *, stack_t *); int sighold(int); -int sigrelse(int); int sigignore(int); +int siginterrupt(int, int); +int sigpause(int); +int sigrelse(int); void (*sigset(int, void (*)(int)))(int); - -int pthread_sigmask(int, const sigset_t *, sigset_t *); -int pthread_kill(pthread_t, int); +#endif #ifdef _GNU_SOURCE typedef int (*sighandler_t)(int); +void (*bsd_signal(int, void (*)(int)))(int); #endif +typedef int sig_atomic_t; + +void (*signal(int, void (*)(int)))(int); +int raise(int); + #ifdef __cplusplus } #endif |