From 3c04dbbde5e257dd33b62e359401c3eeffe5b6a1 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 16 Dec 1991 15:24:24 +0000 Subject: [PATCH] Prevent name clashes with sys/types.h on system V --- mach/arm/as/mach0.c | 4 ++-- mach/i386/as/mach0.c | 4 ++-- mach/m68020/as/mach0.c | 4 ++-- mach/m68k2/as/mach0.c | 4 ++-- mach/ns/as/mach0.c | 4 ++-- mach/proto/as/comm0.h | 16 +++++++--------- mach/proto/as/comm1.h | 4 ++-- mach/proto/as/comm2.y | 4 ++-- mach/proto/as/comm4.c | 2 +- mach/proto/as/comm6.c | 2 +- mach/vax4/as/mach0.c | 4 ++-- mach/z8000/as/mach0.c | 4 ++-- 12 files changed, 27 insertions(+), 29 deletions(-) diff --git a/mach/arm/as/mach0.c b/mach/arm/as/mach0.c index abe7ec45..855541a1 100644 --- a/mach/arm/as/mach0.c +++ b/mach/arm/as/mach0.c @@ -11,8 +11,8 @@ #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long #undef word_t #define word_t long diff --git a/mach/i386/as/mach0.c b/mach/i386/as/mach0.c index fba472ea..0f1b621e 100644 --- a/mach/i386/as/mach0.c +++ b/mach/i386/as/mach0.c @@ -13,5 +13,5 @@ #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long diff --git a/mach/m68020/as/mach0.c b/mach/m68020/as/mach0.c index b3fd9ccb..5a9477a1 100644 --- a/mach/m68020/as/mach0.c +++ b/mach/m68020/as/mach0.c @@ -16,8 +16,8 @@ #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long #undef ASC_LPAR #define ASC_LPAR '{' diff --git a/mach/m68k2/as/mach0.c b/mach/m68k2/as/mach0.c index 87dc1dba..cc9ea5af 100644 --- a/mach/m68k2/as/mach0.c +++ b/mach/m68k2/as/mach0.c @@ -19,8 +19,8 @@ #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long #undef ALIGNWORD #define ALIGNWORD 2 diff --git a/mach/ns/as/mach0.c b/mach/ns/as/mach0.c index 43a57ef4..e24bbcc7 100644 --- a/mach/ns/as/mach0.c +++ b/mach/ns/as/mach0.c @@ -12,8 +12,8 @@ #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long #undef ALIGNSECT #define ALIGNSECT 2 diff --git a/mach/proto/as/comm0.h b/mach/proto/as/comm0.h index c3ea04d0..35d9d6b1 100644 --- a/mach/proto/as/comm0.h +++ b/mach/proto/as/comm0.h @@ -41,10 +41,8 @@ #define GENLAB "I" /* compiler generated labels */ -#define ushort unsigned short - #define valu_t short /* type of expression values */ -#define addr_t ushort /* type of dot */ +#define ADDR_T unsigned short /* type of dot */ #define word_t short /* type of keyword value */ /* * NOTE: word_t is introduced to reduce the tokenfile size for machines @@ -194,15 +192,15 @@ typedef struct item_t item_t; struct sect_t { short s_flag; /* some flag bits */ - addr_t s_base; /* section base */ - addr_t s_size; /* section size */ - addr_t s_comm; /* length of commons */ - addr_t s_zero; /* delayed emit1(0) */ - addr_t s_lign; /* section alignment */ + ADDR_T s_base; /* section base */ + ADDR_T s_size; /* section size */ + ADDR_T s_comm; /* length of commons */ + ADDR_T s_zero; /* delayed emit1(0) */ + ADDR_T s_lign; /* section alignment */ long s_foff; /* section file offset */ item_t *s_item; /* points to section name */ #ifdef THREE_PASS - addr_t s_gain; /* gain in PASS_2 */ + ADDR_T s_gain; /* gain in PASS_2 */ #endif }; diff --git a/mach/proto/as/comm1.h b/mach/proto/as/comm1.h index 1a222e45..39d70816 100644 --- a/mach/proto/as/comm1.h +++ b/mach/proto/as/comm1.h @@ -67,10 +67,10 @@ extern sect_t sect[SECTMAX]; * specials for the location counter */ extern sect_t *DOTSCT; /* §[DOTTYP-S_MIN] or NULL */ -extern addr_t DOTVAL; /* DOTSCT->s_size + DOTSCT->s_base */ +extern ADDR_T DOTVAL; /* DOTSCT->s_size + DOTSCT->s_base */ extern short DOTTYP; /* S_MIN..S_MAX or S_UND */ -extern ushort nname; /* Counts name table index in PASS_3 */ +extern unsigned short nname; /* Counts name table index in PASS_3 */ extern item_t *hashtab[H_TOTAL]; extern short hashindex; /* see item_search() */ diff --git a/mach/proto/as/comm2.y b/mach/proto/as/comm2.y index 98fc2400..1f6428ad 100644 --- a/mach/proto/as/comm2.y +++ b/mach/proto/as/comm2.y @@ -201,7 +201,7 @@ operation (short)( ($4.typ & (S_EXT|S_TYP)) | - ((ushort)$6<<8) + ((unsigned short)$6<<8) ), (short)$7, $4.val @@ -215,7 +215,7 @@ operation (short)( (DOTTYP & (S_EXT|S_TYP)) | - ((ushort)$4<<8) + ((unsigned short)$4<<8) ), (short)$6, (valu_t)DOTVAL diff --git a/mach/proto/as/comm4.c b/mach/proto/as/comm4.c index 2adcfe63..63fff33c 100644 --- a/mach/proto/as/comm4.c +++ b/mach/proto/as/comm4.c @@ -375,7 +375,7 @@ pass_23(n) { register i; #ifdef ASLD - register addr_t base = 0; + register ADDR_T base = 0; #endif register sect_t *sp; diff --git a/mach/proto/as/comm6.c b/mach/proto/as/comm6.c index 997b631e..7156a102 100644 --- a/mach/proto/as/comm6.c +++ b/mach/proto/as/comm6.c @@ -79,7 +79,7 @@ register item_t *ip; { #if DEBUG != 0 #ifdef THREE_PASS - register addr_t oldval = ip->i_valu; + register ADDR_T oldval = ip->i_valu; #endif #endif diff --git a/mach/vax4/as/mach0.c b/mach/vax4/as/mach0.c index 4fa097b6..8cc845ac 100644 --- a/mach/vax4/as/mach0.c +++ b/mach/vax4/as/mach0.c @@ -16,8 +16,8 @@ #define valu_t long #undef word_t #define word_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long #undef ALIGNWORD #define ALIGNWORD 4 diff --git a/mach/z8000/as/mach0.c b/mach/z8000/as/mach0.c index 523dcdbf..1f3c18a8 100644 --- a/mach/z8000/as/mach0.c +++ b/mach/z8000/as/mach0.c @@ -16,5 +16,5 @@ #define ALIGNSECT 2 #undef valu_t #define valu_t long -#undef addr_t -#define addr_t long +#undef ADDR_T +#define ADDR_T long