From: sewardj Date: Tue, 27 Jun 2000 09:18:04 +0000 (+0000) Subject: [project @ 2000-06-27 09:18:04 by sewardj] X-Git-Tag: Approximately_9120_patches~4136 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=578c31a9e76e54c5ca922f38db1461dd8e44e314;p=ghc-hetmet.git [project @ 2000-06-27 09:18:04 by sewardj] Fix compilation problems with int64 and nat64. --- diff --git a/ghc/includes/Assembler.h b/ghc/includes/Assembler.h index f27154e..22244f6 100644 --- a/ghc/includes/Assembler.h +++ b/ghc/includes/Assembler.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Assembler.h,v 1.15 2000/06/15 13:18:08 daan Exp $ + * $Id: Assembler.h,v 1.16 2000/06/27 09:18:04 sewardj Exp $ * * (c) The GHC Team 1994-1998. * @@ -15,18 +15,6 @@ /* ToDo: put this somewhere more sensible */ extern void DEBUG_LoadSymbols( char *name ); -/* Make this compilable with Visual C++ */ -#ifndef HAVE_INT64 -#define HAVE_INT64 -#ifdef _MSC_VER -typedef __int64 int64; -typedef unsigned __int64 nat64; -#else -typedef long long int64; -typedef unsigned long long nat64; -#endif -#endif - /* This file is supposed to be somewhat self-contained because it is one * of the major external interfaces to the runtime system. * Keeping it self-contained reduces the chance of conflict with Hugs diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index 1eb0d27..35a8df0 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.14 2000/06/15 13:16:16 daan Exp $ + * $Id: RtsAPI.h,v 1.15 2000/06/27 09:18:04 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,18 +10,6 @@ #ifndef RTSAPI_H #define RTSAPI_H -/* Make this compilable with Visual C++ */ -#ifndef HAVE_INT64 -#define HAVE_INT64 -#ifdef _MSC_VER -typedef __int64 int64; -typedef unsigned __int64 nat64; -#else -typedef long long int64; -typedef unsigned long long nat64; -#endif -#endif - /* * Running the scheduler */ @@ -35,6 +23,19 @@ typedef enum { 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. +*/ +#if defined(__MSVC__) +typedef __int64 int64; +typedef unsigned __int64 nat64; +#else +typedef long long int64; +typedef unsigned long long nat64; +#endif + /* ---------------------------------------------------------------------------- Starting up and shutting down the Haskell RTS. ------------------------------------------------------------------------- */ @@ -52,11 +53,11 @@ HaskellObj rts_mkInt ( int i ); HaskellObj rts_mkInt8 ( int i ); HaskellObj rts_mkInt16 ( int i ); HaskellObj rts_mkInt32 ( int i ); -HaskellObj rts_mkInt64 ( int64 i ); 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_mkFloat ( float f ); HaskellObj rts_mkDouble ( double f );