in the file alloca.s should be used. */
/* #define C_ALLOCA */
-#ifdef __NetBSD__
+#if defined (__NetBSD__) || defined (__OpenBSD__)
#define HAVE_ALLOCA
#endif
#define STACK_DIRECTION -1
-#ifndef __NetBSD__
+#if !defined (__NetBSD__) && !defined (__OpenBSD__)
#define EXEC_MAGIC 0410
#define PURESIZE 140000
#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;
#define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
-#endif /* __linux__ */
-#endif /* __NetBSD__ */
+#endif /* not __NetBSD__ and not __linux__ and not __OpenBSD__ */
#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>
# 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
#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. */
#define _RDATA ".rdata"
#define _SDATA ".sdata"
#define _SBSS ".sbss"
-#endif /* __NetBSD__ */
+#endif /* __NetBSD__ || __OpenBSD__ */
static void fatal_unexec ();
static void mark_x ();
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;
}
-#endif /* not __linux__ and not __NetBSD__ */
+#endif /* not __linux__ and not __NetBSD__ and not __OpenBSD__ */
}
\f