From d7416a5e4d75fa32190a3ea96e5d9c274a33e33a Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 29 Oct 2001 11:33:37 +0000 Subject: [PATCH] [project @ 2001-10-29 11:33:37 by simonmar] Wrap the include file entry-points in extern "C" { ... } if this is a C++ compiler. --- ghc/includes/HsFFI.h | 12 +++++++++++- ghc/includes/Rts.h | 12 +++++++++++- ghc/includes/RtsAPI.h | 12 +++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ghc/includes/HsFFI.h b/ghc/includes/HsFFI.h index 2b6f353..968bff8 100644 --- a/ghc/includes/HsFFI.h +++ b/ghc/includes/HsFFI.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsFFI.h,v 1.14 2001/03/28 18:48:46 qrczak Exp $ + * $Id: HsFFI.h,v 1.15 2001/10/29 11:33:37 simonmar Exp $ * * (c) The GHC Team, 2000 * @@ -13,6 +13,10 @@ #ifndef HSFFI_H #define HSFFI_H +#ifdef __cplusplus +extern "C" { +#endif + /* get types from GHC's runtime system */ #include "config.h" #include "StgTypes.h" @@ -137,4 +141,10 @@ typedef void* HsForeignObj; /* DEPRECATED */ #define HS_DOUBLE_MAX_EXP DBL_MAX_EXP #define HS_DOUBLE_MAX_10_EXP DBL_MAX_10_EXP +/* -------------------------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif + #endif /* HSFFI_H */ diff --git a/ghc/includes/Rts.h b/ghc/includes/Rts.h index 2fa8591..264857b 100644 --- a/ghc/includes/Rts.h +++ b/ghc/includes/Rts.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Rts.h,v 1.13 2000/04/05 14:26:31 panne Exp $ + * $Id: Rts.h,v 1.14 2001/10/29 11:33:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,6 +10,10 @@ #ifndef RTS_H #define RTS_H +#ifdef __cplusplus +extern "C" { +#endif + #ifndef IN_STG_CODE #define IN_STG_CODE 0 #endif @@ -101,4 +105,10 @@ #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; }) +/* -------------------------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif + #endif /* RTS_H */ diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index 0cb351d..ae6c5c0 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.23 2001/10/23 11:30:07 simonmar Exp $ + * $Id: RtsAPI.h,v 1.24 2001/10/29 11:33:37 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,6 +10,10 @@ #ifndef RTSAPI_H #define RTSAPI_H +#ifdef __cplusplus +extern "C" { +#endif + #include "HsFFI.h" /* @@ -107,4 +111,10 @@ rts_evalLazyIO ( HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret ) void rts_checkSchedStatus ( char* site, SchedulerStatus rc); +/* -------------------------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif + #endif /* RTSAPI_H */ -- 1.7.10.4