no casts in constants used in #if!

This commit is contained in:
ceriel 1989-11-09 18:07:14 +00:00
parent 95fc55f840
commit 0ce3cd0c76
4 changed files with 37 additions and 37 deletions

View file

@ -53,15 +53,15 @@
#define MAXSIZE 8 /* the maximum of the SZ_* constants */
/* target machine sizes */
#define SZ_CHAR (arith)1
#define SZ_SHORT (arith)2
#define SZ_WORD (arith)4
#define SZ_INT (arith)4
#define SZ_LONG (arith)4
#define SZ_FLOAT (arith)4
#define SZ_DOUBLE (arith)8
#define SZ_LNGDBL (arith)8 /* for now */
#define SZ_POINTER (arith)4
#define SZ_CHAR 1
#define SZ_SHORT 2
#define SZ_WORD 4
#define SZ_INT 4
#define SZ_LONG 4
#define SZ_FLOAT 4
#define SZ_DOUBLE 8
#define SZ_LNGDBL 8 /* for now */
#define SZ_POINTER 4
/* target machine alignment requirements */
#define AL_CHAR 1

View file

@ -48,14 +48,14 @@
#define MAXSIZE 8 /* the maximum of the SZ_* constants */
/* target machine sizes */
#define SZ_CHAR (arith)1
#define SZ_SHORT (arith)2
#define SZ_WORD (arith)4
#define SZ_INT (arith)4
#define SZ_LONG (arith)4
#define SZ_FLOAT (arith)4
#define SZ_DOUBLE (arith)8
#define SZ_POINTER (arith)4
#define SZ_CHAR 1
#define SZ_SHORT 2
#define SZ_WORD 4
#define SZ_INT 4
#define SZ_LONG 4
#define SZ_FLOAT 4
#define SZ_DOUBLE 8
#define SZ_POINTER 4
/* target machine alignment requirements */
#define AL_CHAR 1

View file

@ -53,15 +53,15 @@
#define MAXSIZE 8 /* the maximum of the SZ_* constants */
/* target machine sizes */
#define SZ_CHAR (arith)1
#define SZ_SHORT (arith)2
#define SZ_WORD (arith)4
#define SZ_INT (arith)4
#define SZ_LONG (arith)4
#define SZ_FLOAT (arith)4
#define SZ_DOUBLE (arith)8
#define SZ_LNGDBL (arith)8 /* for now */
#define SZ_POINTER (arith)4
#define SZ_CHAR 1
#define SZ_SHORT 2
#define SZ_WORD 4
#define SZ_INT 4
#define SZ_LONG 4
#define SZ_FLOAT 4
#define SZ_DOUBLE 8
#define SZ_LNGDBL 8 /* for now */
#define SZ_POINTER 4
/* target machine alignment requirements */
#define AL_CHAR 1

View file

@ -16,20 +16,20 @@ extern arith
extern arith max_int, max_unsigned; /* cstoper.c */
#else NOCROSS
#define short_size (SZ_SHORT)
#define word_size (SZ_WORD)
#define dword_size (2*SZ_WORD)
#define int_size (SZ_INT)
#define long_size (SZ_LONG)
#define float_size (SZ_FLOAT)
#define double_size (SZ_DOUBLE)
#define lngdbl_size (SZ_LNGDBL)
#define pointer_size (SZ_POINTER)
#define short_size ((arith)SZ_SHORT)
#define word_size ((arith)SZ_WORD)
#define dword_size ((arith)2*SZ_WORD)
#define int_size ((arith)SZ_INT)
#define long_size ((arith)SZ_LONG)
#define float_size ((arith)SZ_FLOAT)
#define double_size ((arith)SZ_DOUBLE)
#define lngdbl_size ((arith)SZ_LNGDBL)
#define pointer_size ((arith)SZ_POINTER)
#if int_size == 2
#if SZ_INT == 2
#define max_int ((arith)32767)
#define max_unsigned ((arith)65535)
#else /* int_size == 4 */
#else /* SZ_INT == 4 */
#define max_int ((arith)2147483647)
#define max_unsigned ((arith)4294967295)
#endif