pkgsrc/emulators/twin/patches/patch-ae
joerg fcfec7dec3 Add DragonFly support. Workaround a bug in DragonFly's time.h when
compiling with _POSIX_SOURCE set (size_t doesn't get defined).
Fix errno. Fix an incorrect va_arg: short gets promoted to int, so use
that.
2006-01-15 19:20:59 +00:00

45 lines
1.4 KiB
Text

$NetBSD: patch-ae,v 1.2 2006/01/15 19:20:59 joerg Exp $
--- debugger/sig_context.h.orig Sun May 13 03:01:07 2001
+++ debugger/sig_context.h Sun May 13 03:25:31 2001
@@ -57,7 +57,21 @@ enum {
#endif /* linux */
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+
+enum {
+ REG_GS = 0, REG_FS, REG_ES, REG_DS,
+ REG_EDI, REG_ESI, REG_EBP,
+ REG_EBX, REG_EDX, REG_ECX, REG_EAX,
+ REG_EIP, REG_CS, REG_EFL, REG_ESP,
+ REG_SS, REG_BSD_ONSTACK, REG_BSD_MASK13,
+ REG_TRAPNO, REG_ERR,
+
+ REG_AX = 100, REG_BX, REG_CX, REG_DX,
+ REG_BP, REG_IP, REG_SP,
+ REG_DI, REG_SI,
+ REG_FL
+};
#include <signal.h>
typedef struct sigcontext SIGCONTEXT;
@@ -120,7 +134,7 @@ typedef struct _CONTEXT /* Note 1 */
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) \
- || defined(__OpenBSD__)
+ || defined(__OpenBSD__) || defined(__DragonFly__)
#define EAX_sig(context) ((context)->sc_eax)
#define EBX_sig(context) ((context)->sc_ebx)
@@ -143,7 +157,7 @@ typedef struct _CONTEXT /* Note 1 */
#define TRAP_sig(context) ((context)->sc_trapno)
#endif
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
#define EFL_sig(context) ((context)->sc_eflags)
#else
#define EFL_sig(context) ((context)->sc_efl)