aboutsummaryrefslogtreecommitdiff
path: root/modules/extlib_util.h
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2012-10-30 19:03:11 +0000
committerTom Schouten <doelie@users.sourceforge.net>2012-10-30 19:03:11 +0000
commitbb1b994ded31ae240d70e849d27ad05498dcf5f7 (patch)
treec626b6b8581f934eb904e3e4c191252818926ea9 /modules/extlib_util.h
parent201a9e763213f555d6797d0c6cad26a533fa75a5 (diff)
creb: CT_ASSERT disabled on -DMACOSX
svn path=/trunk/externals/creb/; revision=16496
Diffstat (limited to 'modules/extlib_util.h')
-rw-r--r--modules/extlib_util.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/extlib_util.h b/modules/extlib_util.h
index e0a7bb3..60624db 100644
--- a/modules/extlib_util.h
+++ b/modules/extlib_util.h
@@ -23,13 +23,20 @@
#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
+#define CT_ASSERT(x)
+#else
#define CT_NAMED_ASSERT(name,x) \
typedef int _GENSYM(name ## _ctassert_)[-((x)==0)]
#define CT_ASSERT(x) CT_NAMED_ASSERT(,x)
#define _GENSYM(x) _CONCAT(x,__COUNTER__)
#define _CONCAT1(x,y) x##y
#define _CONCAT(x,y) _CONCAT1(x,y)
+#endif
/* Only defined in pd-extended. */
#ifndef PD_FLOAT_PRECISION