[vlc-devel] [PATCH] sunstudio fix for unsupported sizeof({})
Francois Cartegnie
fcvlcdev at free.fr
Mon Jun 14 18:36:56 CEST 2010
---
include/vlc_plugin.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index c1a150e..2f7f45c 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -196,9 +196,12 @@ enum vlc_module_properties
goto error;
#define add_shortcut( ... ) \
- if (vlc_module_set (p_submodule, VLC_MODULE_SHORTCUT, \
- sizeof((const char*[]){__VA_ARGS__})/sizeof(const char*), __VA_ARGS__)) \
- goto error;
+ do {\
+ const char* foo [] = {__VA_ARGS__};\
+ if ( vlc_module_set (p_submodule, VLC_MODULE_SHORTCUT, \
+ sizeof(foo)/sizeof(const char*), __VA_ARGS__)) \
+ goto error;\
+ } while(0);
#define set_shortname( shortname ) \
if (vlc_module_set (p_submodule, VLC_MODULE_SHORTNAME, \
--
1.5.6.5
More information about the vlc-devel
mailing list