pkgsrc/devel/bin86/patches/patch-ac
2015-02-23 18:20:21 +00:00

38 lines
1.3 KiB
Text

$NetBSD: patch-ac,v 1.2 2015/02/23 18:20:21 joerg Exp $
--- ld/x86_aout.h.orig 2003-01-28 22:17:14.000000000 +0000
+++ ld/x86_aout.h
@@ -8,13 +8,8 @@
#ifndef __AOUT_H
#define __AOUT_H
-/* If the host isn't an x86 all bets are off, use chars. */
-#if defined(i386) || defined(__BCC__) || defined(MSDOS)
-typedef long Long;
-#define __OUT_OK 1
-#else
-typedef char Long[4];
-#endif
+#include <inttypes.h>
+typedef int32_t Long;
struct exec { /* a.out header */
unsigned char a_magic[2]; /* magic number */
@@ -68,16 +63,14 @@ struct exec { /* a.out header */
#define A_HASEXT(X) ((X).a_hdrlen > (unsigned char) (A_MINHDR + 8))
#define A_HASLNS(X) ((X).a_hdrlen > (unsigned char) (A_MINHDR + 16))
#define A_HASTOFF(X) ((X).a_hdrlen > (unsigned char) (A_MINHDR + 24))
-#ifdef __OUT_OK
#define A_DATAPOS(X) (A_TEXTPOS(X) + (X).a_text)
#define A_TRELPOS(X) (A_DATAPOS(X) + (X).a_data)
#define A_DRELPOS(X) (A_TRELPOS(X) + (X).a_trsize)
#define A_SYMPOS(X) (A_TRELPOS(X) + (A_HASRELS(X) ? \
((X).a_trsize + (X).a_drsize) : 0))
-#endif
struct reloc {
- long r_vaddr; /* virtual address of reference */
+ Long r_vaddr; /* virtual address of reference */
unsigned short r_symndx; /* internal segnum or extern symbol num */
unsigned short r_type; /* relocation type */
};