changeset 19775:70b808126773

Test __OpenBSD__ along with __NetBSD__.
author Richard M. Stallman <rms@gnu.org>
date Sat, 06 Sep 1997 19:37:47 +0000
parents 1ecc4a79d048
children 6910bd6de0d9
files src/m/ns32000.h src/m/sparc.h src/unexalpha.c
diffstat 3 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/m/ns32000.h	Sat Sep 06 04:16:05 1997 +0000
+++ b/src/m/ns32000.h	Sat Sep 06 19:37:47 1997 +0000
@@ -88,7 +88,7 @@
    in the file alloca.s should be used.  */
 
 /* #define C_ALLOCA */
-#ifdef __NetBSD__
+#if defined (__NetBSD__) || defined (__OpenBSD__)
 #define HAVE_ALLOCA
 #endif
 
@@ -103,7 +103,7 @@
 
 #define STACK_DIRECTION -1
 
-#ifndef __NetBSD__
+#if !defined (__NetBSD__) && !defined (__OpenBSD__)
 #define EXEC_MAGIC 0410
 
 #define PURESIZE 140000
--- a/src/m/sparc.h	Sat Sep 06 04:16:05 1997 +0000
+++ b/src/m/sparc.h	Sat Sep 06 19:37:47 1997 +0000
@@ -103,8 +103,7 @@
 #define PURESIZE 130000
 #endif
 
-#ifndef __NetBSD__
-#ifndef __linux__
+#if !defined (__NetBSD__) && !defined (__linux__) && !defined (__OpenBSD__)
 /* This really belongs in s/sun.h.  */
 
 /* Say that the text segment of a.out includes the header;
@@ -117,5 +116,4 @@
 
 #define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
 
-#endif /* __linux__ */
-#endif /* __NetBSD__ */
+#endif /* not __NetBSD__ and not __linux__ and not __OpenBSD__ */
--- a/src/unexalpha.c	Sat Sep 06 04:16:05 1997 +0000
+++ b/src/unexalpha.c	Sat Sep 06 19:37:47 1997 +0000
@@ -27,7 +27,7 @@
 #include <sys/mman.h>
 #include <stdio.h>
 #include <varargs.h>
-#ifndef __NetBSD__
+#if !defined (__NetBSD__) && !defined (__OpenBSD__)
 #include <filehdr.h>
 #include <aouthdr.h>
 #include <scnhdr.h>
@@ -36,7 +36,7 @@
 # include <reloc.h>
 # include <elf_abi.h>
 #endif
-#else /* __NetBSD__ */
+#else /* __NetBSD__ or __OpenBSD__ */
 /*
  * NetBSD/Alpha does not have 'normal' user-land ECOFF support because
  * there's no desire to support ECOFF as the executable format in the
@@ -51,7 +51,11 @@
 #define	HDRR		struct ecoff_symhdr
 #define	pHDRR		HDRR *
 #define	cbHDRR		sizeof(HDRR)
+#ifdef __OpenBSD__
+#define	ALPHAMAGIC	ECOFF_MAGIC_NATIVE_ALPHA
+#else
 #define	ALPHAMAGIC	ECOFF_MAGIC_NETBSD_ALPHA
+#endif
 #define	ZMAGIC		ECOFF_ZMAGIC
 
 /* Misc. constants that NetBSD doesn't define at all. */
@@ -71,7 +75,7 @@
 #define	_RDATA		".rdata"
 #define	_SDATA		".sdata"
 #define	_SBSS		".sbss"
-#endif /* __NetBSD__ */
+#endif /* __NetBSD__ || __OpenBSD__ */
 
 static void fatal_unexec ();
 static void mark_x ();
@@ -422,7 +426,7 @@
      int new;			/* File descriptor for new executable */
      struct aouthdr aout;	/* a.out info from the file header */
 {
-#if !defined (__linux__) && !defined (__NetBSD__)
+#if !defined (__linux__) && !defined (__NetBSD__) && !defined (__OpenBSD__)
 
   typedef struct dynrel_info {
     char * addr;
@@ -492,7 +496,7 @@
 
   }
 
-#endif /* not __linux__ and not __NetBSD__ */
+#endif /* not __linux__ and not __NetBSD__ and not __OpenBSD__ */
 }