[PATCH] Don't include stdbool.h when included from C++

Anton Lundin glance at acc.umu.se
Thu Jan 16 02:17:06 UTC 2014


As noted by Thiago Macieira, we shouldn't include stdbool.h when were
included from a C++-file such as main.cpp

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 subsurfacestartup.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/subsurfacestartup.h b/subsurfacestartup.h
index e5d7750..b09556f 100644
--- a/subsurfacestartup.h
+++ b/subsurfacestartup.h
@@ -4,10 +4,11 @@
 #include "dive.h"
 #include "divelist.h"
 #include "libdivecomputer.h"
-#include <stdbool.h>
 
 #ifdef __cplusplus
 extern "C" {
+#else
+#include <stdbool.h>
 #endif
 
 extern bool imported;
-- 
1.8.3.2



More information about the subsurface mailing list