From 0c59e2e12d64c7201f251d8c9dcc003b2a0a6d73 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 abe7ec450..855541a15 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 fba472ea5..0f1b621ed 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 b3fd9ccbb..5a9477a1c 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 87dc1dba9..cc9ea5af3 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 43a57ef4b..e24bbcc7c 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 c3ea04d07..35d9d6b15 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 1a222e452..39d708162 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 98fc24001..1f6428ad6 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 2adcfe638..63fff33c4 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 997b631ea..7156a102d 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 4fa097b64..8cc845ac2 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 523dcdbf6..1f3c18a83 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 -- 2.34.1