diff options
Diffstat (limited to 'emulators/wine-devel/patches/patch-af')
-rw-r--r-- | emulators/wine-devel/patches/patch-af | 67 |
1 files changed, 3 insertions, 64 deletions
diff --git a/emulators/wine-devel/patches/patch-af b/emulators/wine-devel/patches/patch-af index a00ad8aa7b9..32e7ef0e197 100644 --- a/emulators/wine-devel/patches/patch-af +++ b/emulators/wine-devel/patches/patch-af @@ -1,57 +1,8 @@ -$NetBSD: patch-af,v 1.4 2009/01/17 10:11:14 adam Exp $ +$NetBSD: patch-af,v 1.5 2009/01/30 19:39:04 adam Exp $ ---- dlls/ntdll/signal_i386.c.orig 2009-01-16 17:28:07.000000000 +0100 +--- dlls/ntdll/signal_i386.c.orig 2009-01-30 17:54:01.000000000 +0100 +++ dlls/ntdll/signal_i386.c -@@ -199,7 +199,7 @@ typedef struct trapframe SIGCONTEXT; - - #endif /* bsdi */ - --#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) -+#if (defined(__NetBSD__) && (__NetBSD_Version__ < 200000000)) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) - - typedef struct sigcontext SIGCONTEXT; - -@@ -332,6 +332,39 @@ typedef ucontext_t SIGCONTEXT; - - #endif /* __APPLE__ */ - -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000) -+# include <sys/ucontext.h> -+# include <sys/types.h> -+# include <signal.h> -+ -+typedef ucontext_t SIGCONTEXT; -+ -+#define EAX_sig(context) ((context)->uc_mcontext.__gregs[_REG_EAX]) -+#define EBX_sig(context) ((context)->uc_mcontext.__gregs[_REG_EBX]) -+#define ECX_sig(context) ((context)->uc_mcontext.__gregs[_REG_ECX]) -+#define EDX_sig(context) ((context)->uc_mcontext.__gregs[_REG_EDX]) -+#define ESI_sig(context) ((context)->uc_mcontext.__gregs[_REG_ESI]) -+#define EDI_sig(context) ((context)->uc_mcontext.__gregs[_REG_EDI]) -+#define EBP_sig(context) ((context)->uc_mcontext.__gregs[_REG_EBP]) -+#define ESP_sig(context) _UC_MACHINE_SP(context) -+ -+#define CS_sig(context) ((context)->uc_mcontext.__gregs[_REG_CS]) -+#define DS_sig(context) ((context)->uc_mcontext.__gregs[_REG_DS]) -+#define ES_sig(context) ((context)->uc_mcontext.__gregs[_REG_ES]) -+#define SS_sig(context) ((context)->uc_mcontext.__gregs[_REG_SS]) -+#define FS_sig(context) ((context)->uc_mcontext.__gregs[_REG_FS]) -+#define GS_sig(context) ((context)->uc_mcontext.__gregs[_REG_GS]) -+ -+#define EFL_sig(context) ((context)->uc_mcontext.__gregs[_REG_EFL]) -+#define EIP_sig(context) _UC_MACHINE_PC(context) -+#define TRAP_sig(context) ((context)->uc_mcontext.__gregs[_REG_TRAPNO]) -+#define ERROR_sig(context) ((context)->uc_mcontext.__gregs[_REG_ERR]) -+ -+#define FPU_sig(context) NULL -+#define FPUX_sig(context) ((XMM_SAVE_AREA32 *)&((context)->uc_mcontext.__fpregs)) -+ -+#endif /* __NetBSD__ */ -+ - WINE_DEFAULT_DEBUG_CHANNEL(seh); - - typedef int (*wine_signal_handler)(unsigned int sig); -@@ -366,8 +399,13 @@ enum i386_trap_code +@@ -402,8 +402,13 @@ enum i386_trap_code TRAP_x86_PAGEFLT = T_PAGEFLT, /* Page fault */ TRAP_x86_ARITHTRAP = T_ARITHTRAP, /* Floating point exception */ TRAP_x86_ALIGNFLT = T_ALIGNFLT, /* Alignment check exception */ @@ -65,15 +16,3 @@ $NetBSD: patch-af,v 1.4 2009/01/17 10:11:14 adam Exp $ #else TRAP_x86_DIVIDE = 0, /* Division by zero exception */ TRAP_x86_TRCTRAP = 1, /* Single-step exception */ -@@ -1601,7 +1639,11 @@ void signal_init_process(void) - struct sigaction sig_act; - - sig_act.sa_mask = server_block_set; -+#if defined(__NetBSD__) && (__NetBSD_Version__ < 200000000) -+ sig_act.sa_flags = SA_RESTART; -+#else - sig_act.sa_flags = SA_SIGINFO | SA_RESTART; -+#endif - #ifdef SA_ONSTACK - sig_act.sa_flags |= SA_ONSTACK; - #endif |