From 09a652926fad59bb1d8c9afac3fd128c8fd96218 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Sat, 26 Feb 2011 10:28:48 +0000 Subject: [PATCH] don't define CHIP at all any more, just use the namespace-trained name --- commands/de/de.h | 30 +++--------------------------- commands/mdb/mdb.h | 11 +++-------- commands/synctree/synctree.c | 4 ++-- common/include/minix/config.h | 11 ----------- common/include/minix/const.h | 13 +++++-------- 5 files changed, 13 insertions(+), 56 deletions(-) diff --git a/commands/de/de.h b/commands/de/de.h index ceec8b8b8..6674098d3 100644 --- a/commands/de/de.h +++ b/commands/de/de.h @@ -80,19 +80,11 @@ /* a.out header constants (see a.out.h, if you have it) */ -#if (CHIP == INTEL) +#if (_MINIX_CHIP == _CHIP_INTEL) #define A_OUT 0x0301 #define SPLIT 0x0420 -#endif - -#if (CHIP == M68000) -#define A_OUT 0x0301 -#define SPLIT 0x0B20 -#endif - -#if (CHIP == SPARC) -#define A_OUT 0x0301 -#define SPLIT 0x0B20 +#else +#error only chip == intel is reasonable. #endif /* Each buffer is 1k. In WORD mode 16 words (32 bytes) can be */ @@ -145,22 +137,6 @@ #define BOX_BOT '\334' /* Filled lower half */ #endif -#if (CHIP == M68000) -/* Please change these. */ -#define BOX_CLR ' ' /* Empty box */ -#define BOX_ALL '=' /* Filled box */ -#define BOX_TOP '-' /* Filled upper half */ -#define BOX_BOT '_' /* Filled lower half */ -#endif - -#if (CHIP == SPARC) -/* Please change these. */ -#define BOX_CLR ' ' /* Empty box */ -#define BOX_ALL '=' /* Filled box */ -#define BOX_TOP '-' /* Filled upper half */ -#define BOX_BOT '_' /* Filled lower half */ -#endif - /* Move positions for the output display. */ #define STATUS_COLUMN 2 diff --git a/commands/mdb/mdb.h b/commands/mdb/mdb.h index 206b43c58..6e5d45c20 100644 --- a/commands/mdb/mdb.h +++ b/commands/mdb/mdb.h @@ -49,12 +49,7 @@ #undef printf /* defined as printk in */ -#if (CHIP == M68000) -#define __mc68000__ /* controls processor-dependent stuff */ -#error "only the MINIX_ST 1.5.x implementation works on 68K's" -#endif - -#if (CHIP == INTEL) +#if (_MINIX_CHIP == _CHIP_INTEL) #if (MACHINE == IBM_PC) #define MINIX_PC #else @@ -87,7 +82,7 @@ #define CSEG 0x2E /* 8088 through 80386 */ #define DSEG 0x3E -#if (CHIP == INTEL ) +#if (_MINIX_CHIP == _CHIP_INTEL ) #ifdef __i86 #define N_REG16 2 #endif @@ -99,7 +94,7 @@ #endif #endif -#if (CHIP == INTEL ) +#if (_MINIX_CHIP == _CHIP_INTEL ) #define ADDA(l) ((u16_t) (l) == 0xC481) #ifdef __i386 diff --git a/commands/synctree/synctree.c b/commands/synctree/synctree.c index 69db0a1a4..cc9a18733 100644 --- a/commands/synctree/synctree.c +++ b/commands/synctree/synctree.c @@ -41,8 +41,8 @@ #include "minix/config.h" /*#define BLOCK_SIZE 1024*/ -#define LITTLE_ENDIAN (CHIP == INTEL) -#define USE_SHADOWING (CHIP == M68000) +#define LITTLE_ENDIAN (_MINIX_CHIP == _CHIP_INTEL) +#define USE_SHADOWING (_MINIX_CHIP == _CHIP_M68000) #else #define LITTLE_ENDIAN 0 #define USE_SHADOWING 0 diff --git a/common/include/minix/config.h b/common/include/minix/config.h index 248af894f..c0dfdd521 100644 --- a/common/include/minix/config.h +++ b/common/include/minix/config.h @@ -92,21 +92,10 @@ /*===========================================================================* * There are no user-settable parameters after this line * *===========================================================================*/ -/* Set the CHIP type based on the machine selected. The symbol CHIP is actually - * indicative of more than just the CPU. For example, machines for which - * CHIP == INTEL are expected to have 8259A interrrupt controllers and the - * other properties of IBM PC/XT/AT/386 types machines in general. */ -#define INTEL _CHIP_INTEL /* CHIP type for PC, XT, AT, 386 and clones */ -#define M68000 _CHIP_M68000 /* CHIP type for Atari, Amiga, Macintosh */ -#define SPARC _CHIP_SPARC /* CHIP type for SUN-4 (e.g. SPARCstation) */ - /* Set the FP_FORMAT type based on the machine selected, either hw or sw */ #define FP_NONE _FP_NONE /* no floating point support */ #define FP_IEEE _FP_IEEE /* conform IEEE floating point standard */ -/* _MINIX_CHIP is defined in sys_config.h. */ -#define CHIP _MINIX_CHIP - /* _MINIX_FP_FORMAT is defined in sys_config.h. */ #define FP_FORMAT _MINIX_FP_FORMAT diff --git a/common/include/minix/const.h b/common/include/minix/const.h index 343a8a726..cdd13322b 100644 --- a/common/include/minix/const.h +++ b/common/include/minix/const.h @@ -1,8 +1,8 @@ #ifndef _MINIX_CONST_H #define _MINIX_CONST_H -#ifndef CHIP -#error CHIP is not defined +#ifndef _MINIX_CHIP +#error _MINIX_CHIP is not defined #endif /* The UNUSED annotation tells the compiler or lint not to complain @@ -92,14 +92,11 @@ #define HAVE_SCATTERED_IO 1 /* scattered I/O is now standard */ /* Memory is allocated in clicks. */ -#if (CHIP == INTEL) +#if (_MINIX_CHIP == _CHIP_INTEL) #define CLICK_SIZE 4096 /* unit in which memory is allocated */ #define CLICK_SHIFT 12 /* log2 of CLICK_SIZE */ -#endif - -#if (CHIP == SPARC) || (CHIP == M68000) -#define CLICK_SIZE 4096 /* unit in which memory is allocated */ -#define CLICK_SHIFT 12 /* log2 of CLICK_SIZE */ +#else +#error No reasonable CHIP setting. #endif /* Click alignment macros. */