From dd0afaa4554f62911779906cfbf585f9e6f1dd8d Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Wed, 31 Oct 2012 15:44:18 +0000 Subject: creb: CT_ASSERT workaround for __APPLE__ svn path=/trunk/externals/creb/; revision=16500 --- modules/extlib_util.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules') 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 #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) #else #define CT_NAMED_ASSERT(name,x) \ -- cgit v1.2.1