The stupid CPP has proven me too clever by half.
This commit is contained in:
parent
5184898635
commit
9e2da5f62a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: signal.h,v 1.20 2021/10/27 04:10:48 thorpej Exp $ */
|
||||
/* $NetBSD: signal.h,v 1.21 2021/10/27 05:18:51 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
|
||||
|
@ -42,6 +42,11 @@
|
|||
|
||||
/* VAX versioned its sigcontext trampoline ABI (Sept 2002). */
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION_MAX 2
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION 2
|
||||
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MIN 3
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MAX 3
|
||||
#define __SIGTRAMP_SIGINFO_VERSION 3
|
||||
|
||||
typedef int sig_atomic_t;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: signal.h,v 1.73 2021/10/27 04:10:47 thorpej Exp $ */
|
||||
/* $NetBSD: signal.h,v 1.74 2021/10/27 05:18:51 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
|
@ -163,21 +163,21 @@ struct sigaction {
|
|||
* style handlers pre-dates support for the platform.
|
||||
*
|
||||
* Some architectures have, in the past, needed to version the "sigcontext"
|
||||
* trampoline; an override mechanism (__SIGTRAMP_SIGCONTEXT_VERSION_MAX) is
|
||||
* provided for this purpose. No more changes to the old "sigcontext"
|
||||
* trampoline ABI will ever be performed, and support for it should not be
|
||||
* included when adding support for new architectures. Those architectures
|
||||
* that support the "sigcontext" trampoline must define
|
||||
* __HAVE_STRUCT_SIGCONTEXT in <machine/signal.h>. If a 64-bit architecture
|
||||
* needs to support "sigcontext" trampolines only for 32-bit compatibility,
|
||||
* then __HAVE_STRUCT_SIGCONTEXT can be conditional on _KERNEL.
|
||||
* trampoline; an override mechanism is provided for this purpose. No more
|
||||
* changes to the old "sigcontext" trampoline ABI will ever be performed,
|
||||
* and support for it should not be included when adding support for new
|
||||
* architectures. Those architectures that support the "sigcontext"
|
||||
* trampoline must define __HAVE_STRUCT_SIGCONTEXT in <machine/signal.h>.
|
||||
* If a 64-bit architecture needs to support "sigcontext" trampolines only
|
||||
* for 32-bit compatibility, then __HAVE_STRUCT_SIGCONTEXT can be conditional
|
||||
* on _KERNEL.
|
||||
*
|
||||
* If an architecture defines a sigcontext structure in <machine/signal.h>,
|
||||
* it should be visible only for _KERNEL and _LIBC.
|
||||
*
|
||||
* In the unlikely event that an an architecture needs to version
|
||||
* the "siginfo" trampoline, it can achieve this by overriding
|
||||
* __SIGTRAMP_SIGINFO_VERSION_MAX.
|
||||
* the "siginfo" trampoline, it can achieve this by overriding the
|
||||
* various __SIGTRAMP_SIGINFO_VERSION-related constants.
|
||||
*/
|
||||
|
||||
#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */
|
||||
|
@ -187,31 +187,33 @@ struct sigaction {
|
|||
#define __SIGTRAMP_SIGCONTEXT_VERSION_MIN 1
|
||||
|
||||
#ifndef __SIGTRAMP_SIGCONTEXT_VERSION_MAX
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION_MAX __SIGTRAMP_SIGCONTEXT_VERSION_MIN
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION_MAX 1
|
||||
#endif
|
||||
|
||||
#ifndef __SIGTRAMP_SIGCONTEXT_VERSION
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION 1
|
||||
#endif
|
||||
|
||||
#if __SIGTRAMP_SIGCONTEXT_VERSION_MAX < __SIGTRAMP_SIGCONTEXT_VERSION_MIN
|
||||
#error invalid __SIGTRAMP_SIGCONTEXT_VERSION_MAX
|
||||
#endif
|
||||
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MIN (__SIGTRAMP_SIGCONTEXT_VERSION_MAX + 1)
|
||||
#ifndef __SIGTRAMP_SIGINFO_VERSION_MIN
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MIN 2
|
||||
#endif
|
||||
|
||||
#ifndef __SIGTRAMP_SIGINFO_VERSION_MAX
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MAX __SIGTRAMP_SIGINFO_VERSION_MIN
|
||||
#define __SIGTRAMP_SIGINFO_VERSION_MAX 2
|
||||
#endif
|
||||
|
||||
#ifndef __SIGTRAMP_SIGINFO_VERSION
|
||||
#define __SIGTRAMP_SIGINFO_VERSION 2
|
||||
#endif
|
||||
|
||||
#if __SIGTRAMP_SIGINFO_VERSION_MAX < __SIGTRAMP_SIGINFO_VERSION_MIN
|
||||
#error invalid __SIGTRAMP_SIGINFO_VERSION_MAX
|
||||
#endif
|
||||
|
||||
#ifndef __SIGTRAMP_SIGCONTEXT_VERSION
|
||||
#define __SIGTRAMP_SIGCONTEXT_VERSION __SIGTRAMP_SIGCONTEXT_VERSION_MAX
|
||||
#endif
|
||||
|
||||
#ifndef __SIGTRAMP_SIGINFO_VERSION
|
||||
#define __SIGTRAMP_SIGINFO_VERSION __SIGTRAMP_SIGINFO_VERSION_MAX
|
||||
#endif
|
||||
|
||||
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
|
||||
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
|
||||
#define SA_ONSTACK 0x0001 /* take signal on signal stack */
|
||||
|
|
Loading…
Reference in New Issue