diff --git a/ghc/includes/Assembler.h b/ghc/includes/Assembler.h index 22244f6257b4a7880136eabc77b00fd98c5d9f56..bd40d0a025091b6746fbfe18cccb9cec7f948cd3 100644 --- a/ghc/includes/Assembler.h +++ b/ghc/includes/Assembler.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Assembler.h,v 1.16 2000/06/27 09:18:04 sewardj Exp $ + * $Id: Assembler.h,v 1.17 2000/08/29 13:34:21 qrczak Exp $ * * (c) The GHC Team 1994-1998. * @@ -29,7 +29,7 @@ extern void DEBUG_LoadSymbols( char *name ); typedef unsigned char AsmNat8; typedef unsigned int AsmNat; typedef signed int AsmInt; -typedef int64 AsmInt64; +typedef HsInt64_ AsmInt64; typedef unsigned int AsmWord; typedef void* AsmAddr; typedef unsigned char AsmChar; diff --git a/ghc/includes/HsFFI.h b/ghc/includes/HsFFI.h index f51d41a17b2e143307bfefdf0c9e03b2596f9459..9a349b791301827318440e2cd32aa54fc09574f0 100644 --- a/ghc/includes/HsFFI.h +++ b/ghc/includes/HsFFI.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsFFI.h,v 1.5 2000/08/18 18:08:48 qrczak Exp $ + * $Id: HsFFI.h,v 1.6 2000/08/29 13:34:21 qrczak Exp $ * * (c) The GHC Team, 2000 * @@ -19,7 +19,10 @@ /* get limits for integral types */ #ifdef HAVE_STDINT_H -/* ISO C 99 requires this */ +/* ISO C 99 says: + * "C++ implementations should define these macros only when + * __STDC_LIMIT_MACROS is defined before <stdint.h> is included." + */ #define __STDC_LIMIT_MACROS #include <stdint.h> #else @@ -41,6 +44,16 @@ #define UINT16_MAX (65535U) #define UINT32_MAX (4294967295U) #define UINT64_MAX (18446744073709551615ULL) +/* Define these types too. Some C 99 code may assume that if INT8_MIN + is defined then int8_t is also present. */ +typedef StgInt8 int8_t; +typedef StgInt16 int16_t; +typedef StgInt32 int32_t; +typedef StgInt64 int64_t; +typedef StgWord8 uint8_t; +typedef StgWord16 uint16_t; +typedef StgWord32 uint32_t; +typedef StgWord64 uint64_t; #endif /* get limits for floating point types */ diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index bddb06e26ad379fb7a32de43384937b73e68b20f..348e57a510f903326ed69dd45bfe250edb9e653f 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.16 2000/08/07 23:37:23 qrczak Exp $ + * $Id: RtsAPI.h,v 1.17 2000/08/29 13:34:21 qrczak Exp $ * * (c) The GHC Team, 1998-1999 * @@ -25,15 +25,17 @@ typedef StgClosure *HaskellObj; /* Make this compilable with Visual C++. We can't just use StgInt64 here, - because this file should be compilable without reference to the rest - of the RTS machinery. -*/ + * because this file should be compilable without reference to the rest + * of the RTS machinery. These are absolutely non-standard types, but + * I don't know what alternatives are safe if we don't #include anything + * here. + */ #if defined(__MSVC__) -typedef __int64 int64; -typedef unsigned __int64 nat64; +typedef __int64 HsInt64_; +typedef unsigned __int64 HsWord64_; #else -typedef long long int64; -typedef unsigned long long nat64; +typedef long long HsInt64_; +typedef unsigned long long HsWord64_; #endif /* ---------------------------------------------------------------------------- @@ -57,8 +59,8 @@ HaskellObj rts_mkWord ( unsigned int w ); HaskellObj rts_mkWord8 ( unsigned int w ); HaskellObj rts_mkWord16 ( unsigned int w ); HaskellObj rts_mkWord32 ( unsigned int w ); -HaskellObj rts_mkInt64 ( int64 i ); -HaskellObj rts_mkWord64 ( nat64 w ); +HaskellObj rts_mkInt64 ( HsInt64_ i ); +HaskellObj rts_mkWord64 ( HsWord64_ w ); HaskellObj rts_mkFloat ( float f ); HaskellObj rts_mkDouble ( double f ); HaskellObj rts_mkStablePtr ( StgStablePtr s ); diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index 5bc40087e804a760a0ffad1bb2c590e35aa08561..de6de6268129174b561e1c229779243f32371bc8 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.19 2000/08/15 11:48:06 simonmar Exp $ + * $Id: RtsAPI.c,v 1.20 2000/08/29 13:34:21 qrczak Exp $ * * (c) The GHC Team, 1998-2000 * @@ -75,7 +75,7 @@ rts_mkInt32 (int i) } HaskellObj -rts_mkInt64 (long long int i) +rts_mkInt64 (HsInt64_ i) { long long *tmp; StgClosure *p = (StgClosure *)allocate(CONSTR_sizeW(0,2)); @@ -126,7 +126,7 @@ rts_mkWord32 (unsigned int w) } HaskellObj -rts_mkWord64 (unsigned long long w) +rts_mkWord64 (HsWord64_ w) { unsigned long long *tmp;