X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FHsFFI.h;h=9a349b791301827318440e2cd32aa54fc09574f0;hb=60bf710865eff2ac5a497aad66c2bccc66a70215;hp=f51d41a17b2e143307bfefdf0c9e03b2596f9459;hpb=4b0cbf067ff1231d66082e52b6a46396a42f492b;p=ghc-hetmet.git diff --git a/ghc/includes/HsFFI.h b/ghc/includes/HsFFI.h index f51d41a..9a349b7 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 is included." + */ #define __STDC_LIMIT_MACROS #include #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 */