diff options
authorTom Schouten <doelie@users.sourceforge.net>2012-10-31 15:44:18 +0000
committerTom Schouten <doelie@users.sourceforge.net>2012-10-31 15:44:18 +0000
commitdd0afaa4554f62911779906cfbf585f9e6f1dd8d (patch)
parentbb1b994ded31ae240d70e849d27ad05498dcf5f7 (diff)
creb: CT_ASSERT workaround for __APPLE__
svn path=/trunk/externals/creb/; revision=16500
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/extlib_util.h b/modules/extlib_util.h
index 60624db..b1ceff1 100644
--- a/modules/extlib_util.h
+++ b/modules/extlib_util.h
@@ -23,11 +23,13 @@
#include <math.h>
#include "m_pd.h"
-/* On OSX somehow this expands to '_ctassert___COUNTER__
- i.e. the __COUNTER__ part is not expanded before it is concatenated.
- I guess this is ok to disable it on OSX:
- CT_ASSERTs are active in Linux build. */
-#ifdef MACOSX
+/* Compile-time asserts. */
+/* On OSX it seems that _GENSYM(_ctassert_) expands to
+ '_ctassert___COUNTER__ i.e. the __COUNTER__ built-in symbol is not
+ expanded before it is concatenated. As a workaround it is disabled
+ on OSX. This seems OK since CT_ASSERTs serve their purpose in the
+ Linux build. */
+#ifdef __APPLE__
#define CT_ASSERT(x)
#define CT_NAMED_ASSERT(name,x) \