From 484c10ba5a0de376928201fbac168ea3738407e0 Mon Sep 17 00:00:00 2001 From: Henrik Brautaset Aronsen Date: Mon, 6 May 2013 08:07:03 +0200 Subject: Avoid redefinition of typedef ‘bool’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler on MacOSX wouldn't build Subsurface when bool was redefined. Signed-off-by: Henrik Brautaset Aronsen Signed-off-by: Dirk Hohndel --- dive.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index c13cac0aa..0c2e5b721 100644 --- a/dive.h +++ b/dive.h @@ -17,6 +17,12 @@ #ifdef __cplusplus extern "C" { +#else +#if __STDC_VERSION__ >= 199901L +#include +#else +typedef int bool; +#endif #endif #define O2_IN_AIR 209 // permille @@ -32,7 +38,6 @@ extern "C" { #define SEAWATER_SALINITY 10300 #define FRESHWATER_SALINITY 10000 - /* * Some silly typedefs to make our units very explicit. * -- cgit v1.2.3-70-g09d2