More NetBSD patch
Bang Jun-Young
bjy at mogua.org
Wed May 9 06:18:15 CDT 2001
Bang Jun-Young <bjy at mogua.org>
* server/context_i386.c:
Add support for NetBSD.
* dlls/ntdll/signal_i386.c:
Do not use internal exception codes defined by Wine with NetBSD,
rather use native ones from /usr/include/i386/trap.h. Note that
T_MCHK is not supported by NetBSD.
* dlls/wsock32/socket.c:
On NetBSD if_type is defined as a macro in /usr/include/net/if.h.
Undefine it to avoid a conflict.
Note that the NetBSD port is still broken. I'm testing the rest of patches
which have not yet been proved to work.
--
Bang Jun-Young <bjy at mogua.org>
-------------- next part --------------
--- server/context_i386.c.orig Tue Apr 17 01:44:39 2001
+++ server/context_i386.c Tue Apr 17 01:44:39 2001
@@ -311,7 +311,7 @@
file_set_error();
}
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <machine/reg.h>
/* retrieve a thread context */
--- dlls/ntdll/signal_i386.c.orig Fri Dec 29 12:29:31 2000
+++ dlls/ntdll/signal_i386.c Tue Apr 24 12:04:49 2001
@@ -306,8 +306,8 @@
#endif /* svr4 || SCO_DS */
-/* exception code definitions (already defined by FreeBSD) */
-#ifndef __FreeBSD__ /* FIXME: other BSDs? */
+/* exception code definitions (already defined by FreeBSD/NetBSD) */
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) /* FIXME: other BSDs? */
#define T_DIVIDE 0 /* Division by zero exception */
#define T_TRCTRAP 1 /* Single-step exception */
#define T_NMI 2 /* NMI interrupt */
@@ -328,6 +328,9 @@
#define T_ALIGNFLT 17 /* Alignment check exception */
#define T_MCHK 18 /* Machine check exception */
#define T_CACHEFLT 19 /* Cache flush exception */
+#endif
+#if defined(__NetBSD__)
+#define T_MCHK 19 /* Machine check exception */
#endif
#define T_UNKNOWN (-1) /* Unknown fault (TRAP_sig not defined) */
--- dlls/wsock32/socket.c.orig Wed Feb 28 14:17:44 2001
+++ dlls/wsock32/socket.c Tue Apr 24 13:50:12 2001
@@ -42,6 +42,9 @@
#endif
#include <errno.h>
+#ifdef __NetBSD__
+#undef if_type
+#endif
/* FIXME: The rest of the socket() cdecl<->stdapi stack corruption problem
discussed above. */
More information about the wine-patches
mailing list