summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-01-13 23:54:07 +0000
committermillert <millert@openbsd.org>2004-01-13 23:54:07 +0000
commitb32a5ea281e18c1514c83367402c2eccdfd2c193 (patch)
treeac5fd3d8f319dd0eac2666aae12f7f8cf6a4dbae
parent... and kill library == 0 optimization test that is now bogus with libsupcxx... (diff)
downloadwireguard-openbsd-b32a5ea281e18c1514c83367402c2eccdfd2c193.tar.xz
wireguard-openbsd-b32a5ea281e18c1514c83367402c2eccdfd2c193.zip
Allow building w/o -traditional. OK weingart@ and mickey@
-rw-r--r--sys/arch/i386/stand/libsa/gidt.S11
-rw-r--r--sys/arch/i386/stand/libsa/unixsys.S9
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/libsa/gidt.S b/sys/arch/i386/stand/libsa/gidt.S
index 1438d98880c..e0810e8569b 100644
--- a/sys/arch/i386/stand/libsa/gidt.S
+++ b/sys/arch/i386/stand/libsa/gidt.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: gidt.S,v 1.26 2003/06/03 20:22:12 mickey Exp $ */
+/* $OpenBSD: gidt.S,v 1.27 2004/01/13 23:54:07 millert Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -167,8 +167,13 @@ pmm_init:
ret
+#ifdef __STDC__
+#define IPROC(n) X##n
+#define IEMU(n) IPROC(emu##n)
+#else
#define IPROC(n) X/**/n
#define IEMU(n) IPROC(emu/**/n)
+#endif
.align 8, 0x90
idt:
#define idte(e) \
@@ -185,7 +190,11 @@ idt:
/* Maskable interrupts (32-255) */
/* BIOS entry points (32-63) */
/* DOS entry points (64-80) */
+#ifdef __STDC__
+#define idtb(b) idte(emu##b)
+#else
#define idtb(b) idte(emu/**/b)
+#endif
idtb(0); idtb(1); idtb(2); idtb(3); idtb(4); idtb(5)
idtb(6); idtb(7); idtb(8); idtb(9); idtb(10); idtb(11)
idtb(12); idtb(13); idtb(14); idtb(15); idtb(16); idtb(17)
diff --git a/sys/arch/i386/stand/libsa/unixsys.S b/sys/arch/i386/stand/libsa/unixsys.S
index ec98a050404..b34967e40e2 100644
--- a/sys/arch/i386/stand/libsa/unixsys.S
+++ b/sys/arch/i386/stand/libsa/unixsys.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: unixsys.S,v 1.3 2003/06/03 20:22:12 mickey Exp $ */
+/* $OpenBSD: unixsys.S,v 1.4 2004/01/13 23:54:07 millert Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -31,10 +31,17 @@
#include <sys/syscall.h>
+#ifdef __STDC__
+#define RSYSCALL(x) \
+ ENTRY(u##x); \
+ movl $(SYS_##x), %eax; \
+ jmp 1f
+#else
#define RSYSCALL(x) \
ENTRY(u/**/x); \
movl $(SYS_/**/x), %eax; \
jmp 1f
+#endif
.globl _errno