summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Henrik Brautaset Aronsen <subsurface@henrik.synth.no>2013-05-06 08:07:03 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-06 06:10:08 -0700
commit484c10ba5a0de376928201fbac168ea3738407e0 (patch)
tree23d163e0953df1d36b5fe950e2853d6ca26f0943
parente960a5b55803a576bf883dd4b15dc0fbca775a46 (diff)
downloadsubsurface-484c10ba5a0de376928201fbac168ea3738407e0.tar.gz
Avoid redefinition of typedef ‘bool’
The compiler on MacOSX wouldn't build Subsurface when bool was redefined. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--display.h6
-rw-r--r--dive.h7
-rw-r--r--divelist.h6
-rw-r--r--profile.h6
4 files changed, 6 insertions, 19 deletions
diff --git a/display.h b/display.h
index bc60c059f..047d00589 100644
--- a/display.h
+++ b/display.h
@@ -3,12 +3,6 @@
#ifdef __cplusplus
extern "C" {
-#else
-#if __STDC_VERSION__ >= 199901L
-#include <stdbool.h>
-#else
-typedef int bool;
-#endif
#endif
#define SCALE_SCREEN 1.0
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 <stdbool.h>
+#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.
*
diff --git a/divelist.h b/divelist.h
index d17ea7c12..01ef613d9 100644
--- a/divelist.h
+++ b/divelist.h
@@ -3,12 +3,6 @@
#ifdef __cplusplus
extern "C" {
-#else
-#if __STDC_VERSION__ >= 199901L
-#include <stdbool.h>
-#else
-typedef int bool;
-#endif
#endif
struct dive;
diff --git a/profile.h b/profile.h
index 2c293fa7d..b3cc48a68 100644
--- a/profile.h
+++ b/profile.h
@@ -3,12 +3,6 @@
#ifdef __cplusplus
extern "C" {
-#else
-#if __STDC_VERSION__ >= 199901L
-#include <stdbool.h>
-#else
-typedef int bool;
-#endif
#endif
#include "dive.h"