aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2014-01-05 15:56:56 +0800
committerLAN-TW <lantw44@gmail.com>2014-01-05 15:56:56 +0800
commitc04d1f40df443d209dfedca03b2f4320b7b48ba7 (patch)
tree21ed70ae65062d64ebd81df597e24fd1ff24941f
parent0629ed19b18530ed028875793ea5e75c106b4ed1 (diff)
downloadl4basic-c04d1f40df443d209dfedca03b2f4320b7b48ba7.tar.gz
l4basic-c04d1f40df443d209dfedca03b2f4320b7b48ba7.tar.zst
l4basic-c04d1f40df443d209dfedca03b2f4320b7b48ba7.zip
Detect C++ compiler in l4common.h
-rw-r--r--l4common.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/l4common.h b/l4common.h
index 4c0860c..f5b470e 100644
--- a/l4common.h
+++ b/l4common.h
@@ -14,12 +14,17 @@
# define LBS_COMMON_CHECK_TYPE(x,type) (x)
# endif
#else
-# define bool char
-# define true 1
-# define false 0
-# define inline
-# define LBS_COMMON_ISO_C89
-# define LBS_COMMON_CHECK_TYPE(x,type) (x)
+# ifdef __cplusplus
+# define LBS_COMMON_CXX
+# define LBS_COMMON_CHECK_TYPE(x,type) (x)
+# else
+# define bool char
+# define true 1
+# define false 0
+# define inline
+# define LBS_COMMON_ISO_C89
+# define LBS_COMMON_CHECK_TYPE(x,type) (x)
+# endif /* __cplusplus */
#endif /* __STDC_VERSION__ */
#define LBS_COMMON_NULL_PTR ((void*)NULL)