[ewg] RE: [ofw] [OPENSM] add Windows syntax for varags in a macro
Sean Hefty
sean.hefty at intel.com
Mon Sep 28 16:09:03 PDT 2009
>+#ifdef __WIN__
>+#define OSM_LOG(log, level, fmt, ...) \
>+do { \
>+ if (osm_log_is_active(log, (level))) \
>+ osm_log(log, level, "%s: " fmt, __func__, ## __VA_ARGS__); \
__VA_ARGS__ should work on any platform. libibmad : mad.h uses this for windows
and linux.
>+} while (0)
>+#else
> #define OSM_LOG(log, level, fmt, arg...) do { \
> if (osm_log_is_active(log, (level))) \
> osm_log(log, level, "%s: " fmt, __func__, ##arg); \
> } while (0)
>+#endif
More information about the ewg
mailing list