[Bug 16663] New: build broken in dlls/ntdll/signal_i386.c on OpenBSD 4.4

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Dec 28 20:36:11 CST 2008


http://bugs.winehq.org/show_bug.cgi?id=16663

           Summary: build broken in dlls/ntdll/signal_i386.c on OpenBSD 4.4
           Product: Wine
           Version: 1.1.11
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Keywords: patch, source
          Severity: major
          Priority: P2
         Component: build-env
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: austinenglish at gmail.com


gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_NTSYSTEM_
-D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wwrite-strings
-Wpointer-arith -I/usr/local/include -g -O2  -o signal_i386.o signal_i386.c
signal_i386.c:369: error: `T_MCHK' undeclared here (not in a function)
signal_i386.c:369: error: enumerator value for `TRAP_x86_MCHK' not integer
constant
signal_i386.c:393: error: `T_XMMFLT' undeclared here (not in a function)
signal_i386.c:393: error: enumerator value for `TRAP_x86_CACHEFLT' not integer
constant
signal_i386.c: In function `segv_handler':
signal_i386.c:1399: error: duplicate case value
signal_i386.c:1394: error: previously used here
*** Error code 1

Patch below fixes it. Not submitted yet, definitely over my head, looks like
something Alexandre or Maarten would know more about..

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index bd1e52b..1e0f6b2 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -366,8 +366,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 */
+#if defined(__OpenBSD__)
+    TRAP_x86_MCHK       = T_MACHK,      /* Machine check exception */
+    TRAP_x86_CACHEFLT   = T_XFTRAP      /* SIMD FP exception */
+#else
     TRAP_x86_MCHK       = T_MCHK,       /* Machine check exception */
     TRAP_x86_CACHEFLT   = T_XMMFLT      /* Cache flush exception */
+#endif
 #else
     TRAP_x86_DIVIDE     = 0,   /* Division by zero exception */
     TRAP_x86_TRCTRAP    = 1,   /* Single-step exception */
@@ -1603,9 +1608,6 @@ void signal_init_process(void)

     sig_act.sa_mask = server_block_set;
     sig_act.sa_flags = SA_SIGINFO | SA_RESTART;
-#ifdef SA_ONSTACK
-    sig_act.sa_flags |= SA_ONSTACK;
-#endif

     sig_act.sa_sigaction = int_handler;
     if (sigaction( SIGINT, &sig_act, NULL ) == -1) goto error;


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list