From bb1b994ded31ae240d70e849d27ad05498dcf5f7 Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Tue, 30 Oct 2012 19:03:11 +0000 Subject: creb: CT_ASSERT disabled on -DMACOSX svn path=/trunk/externals/creb/; revision=16496 --- modules/extlib_util.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 #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 -- cgit v1.2.1