blob: 5c42fe9e260fb003210e6a66e240a6bb0518a214 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
#if defined __need_sig_atomic_t || defined __need_sigset_t
# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
#else
#ifndef _GL_SIGNAL_H
#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
#ifndef _GL_SIGNAL_H
#define _GL_SIGNAL_H
#include <sys/types.h>
#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
typedef int rpl_sig_atomic_t;
# undef sig_atomic_t
# define sig_atomic_t rpl_sig_atomic_t
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if @GNULIB_SIGNAL_H_SIGPIPE@
# ifndef SIGPIPE
# define SIGPIPE 13
# define GNULIB_defined_SIGPIPE 1
# endif
#endif
#if !@HAVE_POSIX_SIGNALBLOCKING@
# ifndef NSIG
# define NSIG 32
# endif
typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1];
# if !@HAVE_SIGSET_T@
typedef unsigned int sigset_t;
# endif
extern int sigismember (const sigset_t *set, int sig);
extern int sigemptyset (sigset_t *set);
extern int sigaddset (sigset_t *set, int sig);
extern int sigdelset (sigset_t *set, int sig);
extern int sigfillset (sigset_t *set);
extern int sigpending (sigset_t *set);
# define SIG_BLOCK 0
# define SIG_SETMASK 1
# define SIG_UNBLOCK 2
extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set);
# define signal rpl_signal
extern void (*signal (int sig, void (*func) (int))) (int);
# if GNULIB_defined_SIGPIPE
# undef raise
# define raise rpl_raise
extern int raise (int sig);
# endif
#endif
#if !@HAVE_SIGACTION@
# if !@HAVE_SIGINFO_T@
union sigval
{
int sival_int;
void *sival_ptr;
};
struct siginfo_t
{
int si_signo;
int si_code;
int si_errno;
pid_t si_pid;
uid_t si_uid;
void *si_addr;
int si_status;
long si_band;
union sigval si_value;
};
typedef struct siginfo_t siginfo_t;
# endif
struct sigaction
{
union
{
void (*_sa_handler) (int);
void (*_sa_sigaction) (int, siginfo_t *, void *);
} _sa_func;
sigset_t sa_mask;
int sa_flags;
};
# define sa_handler _sa_func._sa_handler
# define sa_sigaction _sa_func._sa_sigaction
# define SA_RESETHAND 1
# define SA_NODEFER 2
# define SA_RESTART 4
extern int sigaction (int, const struct sigaction *restrict,
struct sigaction *restrict);
#elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
# define sa_sigaction sa_handler
#endif
#ifndef SA_NODEFER
# define SA_NODEFER 0
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif
#endif
|