summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpefo <pefo@openbsd.org>1999-06-01 17:54:31 +0000
committerpefo <pefo@openbsd.org>1999-06-01 17:54:31 +0000
commit5fd8ce1fd69c96eb12ef4b9998d07165bf1bec06 (patch)
treeb2d588e36a07aced828a977d443e3d188014d969
parentfixes for boot are in, kernel is more in sync now (diff)
downloadwireguard-openbsd-5fd8ce1fd69c96eb12ef4b9998d07165bf1bec06.tar.xz
wireguard-openbsd-5fd8ce1fd69c96eb12ef4b9998d07165bf1bec06.zip
Fix some mips -> __mips__ stuff.
-rw-r--r--gnu/libexec/ld.so/ld.so/mips/syscall.h9
-rw-r--r--sys/arch/mips/include/asm.h6
-rw-r--r--sys/compat/ultrix/ultrix_misc.c6
-rw-r--r--sys/kern/exec_elf.c6
-rw-r--r--sys/net/bpf_filter.c4
-rw-r--r--usr.bin/make/arch.c6
6 files changed, 20 insertions, 17 deletions
diff --git a/gnu/libexec/ld.so/ld.so/mips/syscall.h b/gnu/libexec/ld.so/ld.so/mips/syscall.h
index 8b4ee677492..2a7cb588610 100644
--- a/gnu/libexec/ld.so/ld.so/mips/syscall.h
+++ b/gnu/libexec/ld.so/ld.so/mips/syscall.h
@@ -109,21 +109,24 @@ _dl_mmap (void *addr, unsigned int size, unsigned int prot,
"move $7,%3\n\t"
"sw %4,16($29)\n\t"
"sw %5,20($29)\n\t"
-#ifdef MIPSEL
+#ifdef __MIPSEL__
"li $4,197\n\t"
"li $5,0\n\t"
"sw %6,24($29)\n\t"
"sw $0,28($29)\n\t"
"sw %7,32($29)\n\t"
"sw $0,36($29)\n\t"
-#endif
-#ifdef MIPSEB
+#else
+#ifdef __MIPSEB__
"li $4,0\n\t"
"li $5,197\n\t"
"sw %6,24($29)\n\t"
"sw $0,28($29)\n\t"
"sw $0,32($29)\n\t"
"sw %7,36($29)\n\t"
+#else
+#error "__MIPSEB__ or __MIPSEL__ not defined!"
+#endif
#endif
"syscall\n\t"
"addiu $29,40"
diff --git a/sys/arch/mips/include/asm.h b/sys/arch/mips/include/asm.h
index 9fc9c7821e2..eec81c0d31c 100644
--- a/sys/arch/mips/include/asm.h
+++ b/sys/arch/mips/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.2 1998/03/16 09:03:02 pefo Exp $ */
+/* $OpenBSD: asm.h,v 1.3 1999/06/01 17:54:32 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -64,13 +64,13 @@
/*
* Define how to access unaligned data word
*/
-#ifdef MIPSEL
+#if defined(MIPSEL) || defined(__MIPSEL__)
#define LWLO lwl
#define LWHI lwr
#define SWLO swl
#define SWHI swr
#endif
-#ifdef MIPSEB
+#if defined(MIPSEB) || defined(__MIPSEB__)
#define LWLO lwr
#define LWHI lwl
#define SWLO swr
diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c
index b616414ab04..b09bfd6cb9c 100644
--- a/sys/compat/ultrix/ultrix_misc.c
+++ b/sys/compat/ultrix/ultrix_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ultrix_misc.c,v 1.13 1998/01/05 03:15:22 deraadt Exp $ */
+/* $OpenBSD: ultrix_misc.c,v 1.14 1999/06/01 17:54:32 pefo Exp $ */
/* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */
/*
@@ -134,9 +134,9 @@ extern char *ultrix_syscallnames[];
/*
* Select the appropriate setregs callback for the target architecture.
*/
-#ifdef mips
+#ifdef __mips__
#define ULTRIX_EXEC_SETREGS cpu_exec_ecoff_setregs
-#endif /* mips */
+#endif /* __mips__ */
#ifdef vax
#define ULTRIX_EXEC_SETREGS setregs
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 9045261c8e5..37b683b6bb0 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.24 1999/02/10 08:07:20 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.25 1999/06/01 17:54:31 pefo Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -402,7 +402,7 @@ elf_load_file(p, path, epp, ap, last)
for (i = 0; i < eh.e_phnum; i++) {
u_long size = 0;
int prot = 0;
-#ifdef mips
+#if defined(__mips__)
if (*last == ELF32_NO_ADDR)
addr = ELF32_NO_ADDR; /* GRRRRR!!!!! */
#endif
@@ -598,7 +598,7 @@ exec_elf_makecmds(p, epp)
}
}
-#if !defined(mips)
+#if !defined(__mips__)
/*
* If no position to load the interpreter was set by a probe
* function, pick the same address that a non-fixed mmap(0, ..)
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c
index cd685a2deab..71e7348d5df 100644
--- a/sys/net/bpf_filter.c
+++ b/sys/net/bpf_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf_filter.c,v 1.4 1996/08/22 00:35:50 deraadt Exp $ */
+/* $OpenBSD: bpf_filter.c,v 1.5 1999/06/01 17:54:31 pefo Exp $ */
/* $NetBSD: bpf_filter.c,v 1.12 1996/02/13 22:00:00 christos Exp $ */
/*
@@ -51,7 +51,7 @@
#include <netinet/in.h>
#endif
-#if defined(sparc) || defined(mips) || defined(ibm032) || \
+#if defined(sparc) || defined(__mips__) || defined(ibm032) || \
((defined(__NetBSD__) || defined(__OpenBSD__)) && !defined(UNALIGNED_ACCESS))
#define BPF_ALIGN
#endif
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index f2bdc417796..81f75a9bc6b 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.14 1998/12/05 00:06:26 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.15 1999/06/01 17:54:31 pefo Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: arch.c,v 1.14 1998/12/05 00:06:26 espie Exp $";
+static char rcsid[] = "$OpenBSD: arch.c,v 1.15 1999/06/01 17:54:31 pefo Exp $";
#endif
#endif /* not lint */
@@ -134,7 +134,7 @@ static void ArchFree __P((ClientData));
static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
#if defined(__svr4__) || defined(__SVR4) || \
- (defined(__OpenBSD__) && defined(__mips)) || \
+ (defined(__OpenBSD__) && defined(__mips__)) || \
(defined(__OpenBSD__) && defined(__powerpc))
#define SVR4ARCHIVES
static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *));