diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-13 19:26:16 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-13 19:26:16 +0000 |
commit | 841cbf6f63668e286a580ede386af719a05ae50b (patch) | |
tree | fc97293791db99e5073ef5cf027c33ff852815c1 /lib/make/cctk_Config.h.in | |
parent | 5a4c7464ba9c1de348dbf3bebd8c6f74d6b29026 (diff) |
Some changes prompted by PR/1320:
Added #define of SIZEOF_LONG_LONG to cctk_Config.h.in
Added macros which detect the presence of bool in C and restrict in C++.
Currently these define CCTK_... macros but don't #define bool in C or
restrict in C++ as these would be non-standard features which might
conflict with user-written macros or code.
Moved AC_C_RESTRICT macro to aclocal.m4 and renamed it to CCTK_C_RESTRICT to
conform with autoconf naming conventions.
Created macro for detecting presence of bool in CXX and changed to use the
macro.
A little bit of tidying up of cctk_Config.h.in to make the file a bit easier to
read.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3173 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/cctk_Config.h.in')
-rw-r--r-- | lib/make/cctk_Config.h.in | 68 |
1 files changed, 51 insertions, 17 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index a660afd0..88055cb1 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -10,15 +10,17 @@ /* Size info for various types */ -/* The number of bytes in a long int. */ -#undef SIZEOF_LONG_INT +/* The number of bytes in a short int. */ +#undef SIZEOF_SHORT_INT /* The number of bytes in a int. */ #undef SIZEOF_INT -/* The number of bytes in a short int. */ -#undef SIZEOF_SHORT_INT +/* The number of bytes in a long int. */ +#undef SIZEOF_LONG_INT +/* The number of bytes in a short int. */ +#undef SIZEOF_LONG_LONG /* The number of bytes in a long double. */ #undef SIZEOF_LONG_DOUBLE @@ -155,18 +157,9 @@ #undef CCTK_BUILD_CPU #undef CCTK_BUILD_VENDOR -#ifdef __cplusplus - -/* Some C++ compilers don't have bool ! */ -#undef HAVE_BOOL - -#ifndef HAVE_BOOL -typedef enum {false, true} bool; -#endif /* HAVE_BOOL */ - -#endif /* __cplusplus */ - -/* These are definitely there in C++ */ +/****************************************************************************/ +/* C specific stuff */ +/****************************************************************************/ #ifndef __cplusplus /* Define as __inline if that's what the C compiler calls it. */ @@ -175,10 +168,51 @@ typedef enum {false, true} bool; /* Define to empty if the keyword does not work. */ #undef const +#undef CCTK_C_RESTRICT + /* Define to empty if the keyword does not work. */ -#undef restrict +#ifdef CCTK_C_RESTRICT +#define restrict CCTK_C_RESTRICT +#endif + +/* Some C compilers (e.g. c99 ones) define bool */ +#undef CCTK_HAVE_C_BOOL + +/* Since this is non-standard leave commented out for the moment */ +#if 0 +#ifndef CCTK_HAVE_C_BOOL +typedef enum {false, true} bool; +#endif /* CCTK_HAVE_CXX_BOOL */ +#endif /* 0 */ #endif /* ! defined __cplusplus */ +/****************************************************************************/ + +/****************************************************************************/ +/* C++ specific stuff */ +/****************************************************************************/ +#ifdef __cplusplus + +/* Some C++ compilers don't have bool ! */ +#undef CCTK_HAVE_CXX_BOOL + +#ifndef CCTK_HAVE_CXX_BOOL +typedef enum {false, true} bool; +#endif /* CCTK_HAVE_CXX_BOOL */ + +/* Some C++ compilers recognise the restrict keyword */ +#undef CCTK_CXX_RESTRICT + +/* Since this is non-standard leave commented out for the moment */ +#if 0 +/* Define to empty if the keyword does not work. */ +#ifdef CCTK_CXX_RESTRICT +#define restrict CCTK_CXX_RESTRICT +#endif +#endif /* 0 */ + +#endif /* __cplusplus */ +/****************************************************************************/ #endif /*CCODE */ |