From 54ed9d2850d8e9935751cdb21ce08d32f0c15c2c Mon Sep 17 00:00:00 2001 From: eschnett Date: Sun, 14 Aug 2011 17:29:27 +0000 Subject: Check HAVE_CCTK_C_INLINE to see if inlining is supported git-svn-id: http://svn.cactuscode.org/flesh/trunk@4716 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/include/cctk.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/cctk.h b/src/include/cctk.h index 7d3327da..be8e6d6a 100644 --- a/src/include/cctk.h +++ b/src/include/cctk.h @@ -175,11 +175,11 @@ cctk_convfac,cctk_nghostzones,cctk_iteration,cctkGH */ #ifdef __cplusplus -#define HAVE_INLINE +# define HAVE_INLINE #else -#ifndef inline -#define HAVE_INLINE -#endif +# ifdef HAVE_CCTK_C_INLINE +# define HAVE_INLINE +# endif #endif #ifdef HAVE_INLINE @@ -240,7 +240,7 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *GH, (l + GH->cctk_lsh[3]*n)))); } -#else /* ! defined(__cplusplus) && defined(inline) */ +#else /* ! defined(HAVE_INLINE) */ #ifdef CCTK_DEBUG /* The "inline" keyword is not supported, and we want to debug */ @@ -286,7 +286,10 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *GH, #endif /* ! defined(CCTK_DEBUG) */ -#endif /* ! defined(__cplusplus) && defined(inline) */ +#endif /* ! defined(HAVE_INLINE) */ + +#undef HAVE_INLINE + #define CCTK_PRINTSEPARATOR \ -- cgit v1.2.3