Subversion Repositories Kolibri OS

Rev

Rev 4921 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4921 Rev 6099
Line 5... Line 5...
5
#ifdef __cplusplus
5
#ifdef __cplusplus
6
extern "C" {
6
extern "C" {
7
#endif
7
#endif
Line 8... Line 8...
8
 
8
 
-
 
9
#include "_ansi.h"
9
#include "_ansi.h"
10
#include 
10
#include 
11
#include 
-
 
12
#include 
-
 
13
#include 
Line 11... Line 14...
11
#include 
14
#include 
Line 12... Line 15...
12
 
15
 
13
/* #ifndef __STRICT_ANSI__*/
16
/* #ifndef __STRICT_ANSI__*/
14
 
17
 
15
/* Cygwin defines it's own sigset_t in include/cygwin/signal.h */
18
#if !defined(_SIGSET_T_DECLARED)
Line 16... Line 19...
16
#ifndef __CYGWIN__
19
#define	_SIGSET_T_DECLARED
Line 17... Line 20...
17
typedef unsigned long sigset_t;
20
typedef	__sigset_t	sigset_t;
Line 69... Line 72...
69
} siginfo_t;
72
} siginfo_t;
70
#endif
73
#endif
Line 71... Line 74...
71
 
74
 
Line 72... Line 75...
72
/*  3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76 */
75
/*  3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76 */
73
 
76
 
74
#define SA_NOCLDSTOP 1   /* Do not generate SIGCHLD when children stop */
77
#define SA_NOCLDSTOP 0x1   /* Do not generate SIGCHLD when children stop */
-
 
78
#define SA_SIGINFO   0x2   /* Invoke the signal catching function with */
-
 
79
                           /*   three arguments instead of one. */
-
 
80
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
Line 75... Line 81...
75
#define SA_SIGINFO   2   /* Invoke the signal catching function with */
81
#define SA_ONSTACK   0x4   /* Signal delivery will be on a separate stack. */
76
                         /*   three arguments instead of one. */
82
#endif
77
 
83
 
78
/* struct sigaction notes from POSIX:
84
/* struct sigaction notes from POSIX:
Line 117... Line 123...
117
	sigset_t sa_mask;
123
	sigset_t sa_mask;
118
	int sa_flags;
124
	int sa_flags;
119
};
125
};
120
#endif /* defined(__rtems__) */
126
#endif /* defined(__rtems__) */
Line -... Line 127...
-
 
127
 
-
 
128
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
-
 
129
/*
-
 
130
 * Minimum and default signal stack constants. Allow for target overrides
-
 
131
 * from .
-
 
132
 */
-
 
133
#ifndef	MINSIGSTKSZ
-
 
134
#define	MINSIGSTKSZ	2048
-
 
135
#endif
-
 
136
#ifndef	SIGSTKSZ
-
 
137
#define	SIGSTKSZ	8192
-
 
138
#endif
-
 
139
 
-
 
140
/*
-
 
141
 * Possible values for ss_flags in stack_t below.
-
 
142
 */
-
 
143
#define	SS_ONSTACK	0x1
-
 
144
#define	SS_DISABLE	0x2
-
 
145
 
-
 
146
#endif
-
 
147
 
-
 
148
/*
-
 
149
 * Structure used in sigaltstack call.
-
 
150
 */
-
 
151
typedef struct sigaltstack {
-
 
152
  void     *ss_sp;    /* Stack base or pointer.  */
-
 
153
  int       ss_flags; /* Flags.  */
-
 
154
  size_t    ss_size;  /* Stack size.  */
-
 
155
} stack_t;
121
 
156
 
122
#define SIG_SETMASK 0	/* set mask with sigprocmask() */
157
#define SIG_SETMASK 0	/* set mask with sigprocmask() */
123
#define SIG_BLOCK 1	/* set of signals to block */
158
#define SIG_BLOCK 1	/* set of signals to block */
Line 124... Line 159...
124
#define SIG_UNBLOCK 2	/* set of signals to, well, unblock */
159
#define SIG_UNBLOCK 2	/* set of signals to, well, unblock */
Line 136... Line 171...
136
 
171
 
137
#if defined(_POSIX_THREADS)
172
#if defined(_POSIX_THREADS)
138
int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset));
173
int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset));
Line 139... Line -...
139
#endif
-
 
140
 
174
#endif
141
/* protos for functions found in winsup sources for CYGWIN */
175
 
142
#if defined(__CYGWIN__) || defined(__rtems__)
176
#if defined(__CYGWIN__) || defined(__rtems__)
143
#undef sigaddset
177
#undef sigaddset
144
#undef sigdelset
178
#undef sigdelset
145
#undef sigemptyset
179
#undef sigemptyset
Line 146... Line 180...
146
#undef sigfillset
180
#undef sigfillset
147
#undef sigismember
181
#undef sigismember
-
 
182
 
-
 
183
#ifdef _COMPILING_NEWLIB
148
 
184
int _EXFUN(_kill, (pid_t, int));
149
#ifdef _COMPILING_NEWLIB
185
#endif /* _COMPILING_NEWLIB */
-
 
186
#endif /* __CYGWIN__ || __rtems__ */
-
 
187
 
150
int _EXFUN(_kill, (pid_t, int));
188
int _EXFUN(kill, (pid_t, int));
151
#endif
189
 
152
int _EXFUN(kill, (pid_t, int));
190
#if defined(__CYGWIN__) || defined(__rtems__)
153
int _EXFUN(killpg, (pid_t, int));
191
int _EXFUN(killpg, (pid_t, int));
154
int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
192
int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
Line 159... Line 197...
159
int _EXFUN(sigemptyset, (sigset_t *));
197
int _EXFUN(sigemptyset, (sigset_t *));
160
int _EXFUN(sigpending, (sigset_t *));
198
int _EXFUN(sigpending, (sigset_t *));
161
int _EXFUN(sigsuspend, (const sigset_t *));
199
int _EXFUN(sigsuspend, (const sigset_t *));
162
int _EXFUN(sigpause, (int));
200
int _EXFUN(sigpause, (int));
Line -... Line 201...
-
 
201
 
-
 
202
#if defined(__CYGWIN__) || defined(__rtems__)
-
 
203
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
-
 
204
int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict));
-
 
205
#endif
-
 
206
#endif
163
 
207
 
164
#if defined(_POSIX_THREADS)
208
#if defined(_POSIX_THREADS)
165
#ifdef __CYGWIN__
209
#ifdef __CYGWIN__
166
#  ifndef _CYGWIN_TYPES_H
210
#  ifndef _CYGWIN_TYPES_H
167
#    error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib.
211
#    error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib.
Line 307... Line 351...
307
 
351
 
308
#ifdef __cplusplus
352
#ifdef __cplusplus
309
}
353
}
Line -... Line 354...
-
 
354
#endif
-
 
355
 
-
 
356
#if defined(__CYGWIN__)
-
 
357
#if __POSIX_VISIBLE >= 200809
-
 
358
#include 
-
 
359
#endif
310
#endif
360
#endif
311
 
361
 
312
#ifndef _SIGNAL_H_
362
#ifndef _SIGNAL_H_
313
/* Some applications take advantage of the fact that 
363
/* Some applications take advantage of the fact that 
314
 * and  are equivalent in glibc.  Allow for that here.  */
364
 * and  are equivalent in glibc.  Allow for that here.  */