X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FRts.h;h=b0ad6ead6d72ded689bd35bd1201cf9f1763ade9;hb=9208824c858a5e8c4dbed212a2fc26248aaa6fc1;hp=d6f5eb9b1d9a1d52ea3126b4f417b756663a67b5;hpb=5af1a666354cff3c986ad8f4d6be844ac6d260dd;p=ghc-hetmet.git diff --git a/ghc/includes/Rts.h b/ghc/includes/Rts.h index d6f5eb9..b0ad6ea 100644 --- a/ghc/includes/Rts.h +++ b/ghc/includes/Rts.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Rts.h,v 1.22 2002/12/19 17:57:39 panne Exp $ + * $Id: Rts.h,v 1.23 2003/11/12 17:27:03 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -96,12 +96,21 @@ extern void* GetFiberData ( void ); #define STG_UNUSED #endif +#if defined(__GNUC__) +#define SUPPORTS_TYPEOF +#endif + /* ----------------------------------------------------------------------------- Useful macros and inline functions -------------------------------------------------------------------------- */ +#if defined(SUPPORTS_TYPEOF) #define stg_min(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _a : _b; }) #define stg_max(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _b : _a; }) +#else +#define stg_min(a,b) ((a) <= (b) ? (a) : (b)) +#define stg_max(a,b) ((a) <= (b) ? (b) : (a)) +#endif /* -------------------------------------------------------------------------- */