Hello,
  Adding Windows version of OSM_LOG macro to accommodate windows syntax for cpp 
varargs.

Signed-off-by: Stan Smith (stan.sm...@intel.com)

diff --git a/opensm/include/opensm/osm_log.h b/opensm/include/opensm/osm_log.h
index 20999d9..54c8ea4 100644
--- a/opensm/include/opensm/osm_log.h
+++ b/opensm/include/opensm/osm_log.h
@@ -390,10 +390,18 @@ extern void osm_log_msg_box(osm_log_t *log, 
osm_log_level_t level,
 extern void osm_log_raw(IN osm_log_t * const p_log,
            IN const osm_log_level_t verbosity, IN const char *p_buf);
 
+#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__); \
+} 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
 
 #define OSM_LOG_MSG_BOX(log, level, msg) \
 

_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to