[x264-devel] [PATCH] osdep: Fix variadic macro expansion with ICL

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Sep 17 19:29:12 CEST 2012


ICL's preprocessor doesn't handle it correctly, in a similar way to
MSVC's. This fix is in a similar fashion to Libav's fix in
0db2d94280e260af5f3ad7993c5a6357462f17c9.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 common/osdep.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/osdep.h b/common/osdep.h
index f7cad57..c646776 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -108,8 +108,10 @@
     ALIGNED_16( type name sub1 __VA_ARGS__ )
 #endif
 
-#define ALIGNED_ARRAY_32( ... ) ALIGNED_ARRAY_EMU( 31, __VA_ARGS__ )
-#define ALIGNED_ARRAY_64( ... ) ALIGNED_ARRAY_EMU( 63, __VA_ARGS__ )
+#define E(x) x
+
+#define ALIGNED_ARRAY_32( ... ) E( ALIGNED_ARRAY_EMU( 31, __VA_ARGS__ ) )
+#define ALIGNED_ARRAY_64( ... ) E( ALIGNED_ARRAY_EMU( 63, __VA_ARGS__ ) )
 
 #define UNINIT(x) x=x
 
-- 
1.7.9.5



More information about the x264-devel mailing list