diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-04 03:44:14 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-04 04:03:13 +0100 |
commit | ba89615dabf44e9e447a3076cf56321ed4505a54 (patch) | |
tree | 4980f144585852f805dd19b9f23d0df42847726e /hurd/hurd/signal.h | |
parent | a726c87a149869b51f1c050014d320ff15df81bb (diff) |
hurd: Make almost all hurd headers includable in all standards
* hurd/hurd.h: Include <bits/types/sigset_t.h>
* hurd/hurd/fd.h: Include <sys/select.h> and <bits/types/sigset_t.h>
(_hurd_fd_read, _hurd_fd_write): Use __loff_t instead of loff_t.
* hurd/hurd/signal.h: Include <bits/types/stack_t.h> and
<bits/types/sigset_t.h>.
[!defined __USE_GNU]: Do not #error out.
(struct hurd_sigstate): Use _NSIG instead of NSIG.
* hurd/hurd/sigpreempt.h (__need_size_t): Define.
Include <stddef.h> and <bits/types/sigset_t.h>
(struct hurd_signal_preemptor, hurd_catch_signal): Use __sighandler_t
instead of sighandler_t.
Diffstat (limited to 'hurd/hurd/signal.h')
-rw-r--r-- | hurd/hurd/signal.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h index 53234724a4..9cb5f3cfc4 100644 --- a/hurd/hurd/signal.h +++ b/hurd/hurd/signal.h @@ -20,10 +20,6 @@ #define _HURD_SIGNAL_H 1 #include <features.h> -/* Make sure <signal.h> is going to define NSIG. */ -#ifndef __USE_GNU -#error "Must have `_GNU_SOURCE' feature test macro to use this file" -#endif #define __need_size_t #define __need_NULL @@ -35,6 +31,8 @@ #include <hurd/hurd_types.h> #include <signal.h> #include <errno.h> +#include <bits/types/stack_t.h> +#include <bits/types/sigset_t.h> #include <hurd/msg.h> #include <cthreads.h> /* For `struct mutex'. */ @@ -74,7 +72,7 @@ struct hurd_sigstate sigset_t blocked; /* What signals are blocked. */ sigset_t pending; /* Pending signals, possibly blocked. */ - struct sigaction actions[NSIG]; + struct sigaction actions[_NSIG]; stack_t sigaltstack; /* Chain of thread-local signal preemptors; see <hurd/sigpreempt.h>. @@ -84,7 +82,7 @@ struct hurd_sigstate struct hurd_signal_preemptor *preemptors; /* For each signal that may be pending, the details to deliver it with. */ - struct hurd_signal_detail pending_data[NSIG]; + struct hurd_signal_detail pending_data[_NSIG]; /* If `suspended' is set when this thread gets a signal, the signal thread sends an empty message to it. */ |