Commit 3e790230 authored by qrczak's avatar qrczak
Browse files

[project @ 2000-08-29 13:34:21 by qrczak]

Don't use a typedef called int64 in RtsAPI.
It conflicts with e.g. OCaml's headers.
It should be cleaned better...
parent a61dd342
/* -----------------------------------------------------------------------------
* $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;
......
/* -----------------------------------------------------------------------------
* $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 */
......
/* ----------------------------------------------------------------------------
* $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 );
......
/* ----------------------------------------------------------------------------
* $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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment