Feature test macros overhaul: Cygwin signal.h
This should match newlib's <sys/signal.h>. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
parent
8a3b3bb4d7
commit
6a6c1c52e6
|
@ -190,6 +190,8 @@ struct _sigcommune
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 199309
|
||||||
|
|
||||||
#define __SI_PAD_SIZE 32
|
#define __SI_PAD_SIZE 32
|
||||||
#ifdef __INSIDE_CYGWIN__
|
#ifdef __INSIDE_CYGWIN__
|
||||||
# ifndef max
|
# ifndef max
|
||||||
|
@ -251,6 +253,8 @@ typedef struct
|
||||||
} siginfo_t;
|
} siginfo_t;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif /* __POSIX_VISIBLE >= 199309 */
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SI_USER = 0, /* sent by kill, raise, pthread_kill */
|
SI_USER = 0, /* sent by kill, raise, pthread_kill */
|
||||||
|
@ -314,6 +318,8 @@ enum
|
||||||
|
|
||||||
typedef void (*_sig_func_ptr)(int);
|
typedef void (*_sig_func_ptr)(int);
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE
|
||||||
|
|
||||||
struct sigaction
|
struct sigaction
|
||||||
{
|
{
|
||||||
__extension__ union
|
__extension__ union
|
||||||
|
@ -344,11 +350,17 @@ struct sigaction
|
||||||
Do not use. */
|
Do not use. */
|
||||||
#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */
|
#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */
|
||||||
|
|
||||||
|
#endif /* __POSIX_VISIBLE */
|
||||||
|
|
||||||
|
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
|
||||||
|
|
||||||
#undef MINSIGSTKSZ
|
#undef MINSIGSTKSZ
|
||||||
#define MINSIGSTKSZ 8192
|
#define MINSIGSTKSZ 8192
|
||||||
#undef SIGSTKSZ
|
#undef SIGSTKSZ
|
||||||
#define SIGSTKSZ 32768
|
#define SIGSTKSZ 32768
|
||||||
|
|
||||||
|
#endif /* __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 */
|
||||||
|
|
||||||
#define SIGHUP 1 /* hangup */
|
#define SIGHUP 1 /* hangup */
|
||||||
#define SIGINT 2 /* interrupt */
|
#define SIGINT 2 /* interrupt */
|
||||||
#define SIGQUIT 3 /* quit */
|
#define SIGQUIT 3 /* quit */
|
||||||
|
@ -397,20 +409,32 @@ struct sigaction
|
||||||
|
|
||||||
#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */
|
#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
void psiginfo (const siginfo_t *, const char *);
|
void psiginfo (const siginfo_t *, const char *);
|
||||||
|
#endif
|
||||||
|
#if __POSIX_VISIBLE
|
||||||
int sigwait (const sigset_t *, int *);
|
int sigwait (const sigset_t *, int *);
|
||||||
|
#endif
|
||||||
|
#if __POSIX_VISIBLE >= 199309
|
||||||
int sigwaitinfo (const sigset_t *, siginfo_t *);
|
int sigwaitinfo (const sigset_t *, siginfo_t *);
|
||||||
|
#endif
|
||||||
|
#if __XSI_VISIBLE >= 4
|
||||||
int sighold (int);
|
int sighold (int);
|
||||||
int sigignore (int);
|
int sigignore (int);
|
||||||
int sigrelse (int);
|
int sigrelse (int);
|
||||||
_sig_func_ptr sigset (int, _sig_func_ptr);
|
_sig_func_ptr sigset (int, _sig_func_ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 199309
|
||||||
int sigqueue(pid_t, int, const union sigval);
|
int sigqueue(pid_t, int, const union sigval);
|
||||||
|
#endif
|
||||||
|
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
|
||||||
int siginterrupt (int, int);
|
int siginterrupt (int, int);
|
||||||
|
#endif
|
||||||
#ifdef __INSIDE_CYGWIN__
|
#ifdef __INSIDE_CYGWIN__
|
||||||
extern const char *sys_sigabbrev[];
|
extern const char *sys_sigabbrev[];
|
||||||
extern const char *sys_siglist[];
|
extern const char *sys_siglist[];
|
||||||
#else
|
#elif __BSD_VISIBLE
|
||||||
extern const char __declspec(dllimport) *sys_sigabbrev[];
|
extern const char __declspec(dllimport) *sys_sigabbrev[];
|
||||||
extern const char __declspec(dllimport) *sys_siglist[];
|
extern const char __declspec(dllimport) *sys_siglist[];
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue