shithub: aubio

Download patch

ref: dc08c4fcd50e7b58b4ff802f5719ac4c41a589cf
parent: 8743b33bc8aabd209d284b4aa560334f039388a0
author: Paul Brossier <piem@piem.org>
date: Sat Apr 23 14:27:44 EDT 2016

tests/utils_tests.h: add VA_ARGS versions of variadic macros

--- a/tests/utils_tests.h
+++ b/tests/utils_tests.h
@@ -5,10 +5,17 @@
 #include <assert.h>
 #include "config.h"
 
+#ifdef HAVE_C99_VARARGS_MACROS
+#define PRINT_ERR(...)   fprintf(stderr, "AUBIO-TESTS ERROR: " __VA_ARGS__)
+#define PRINT_MSG(...)   fprintf(stdout, __VA_ARGS__)
+#define PRINT_DBG(...)   fprintf(stderr, __VA_ARGS__)
+#define PRINT_WRN(...)   fprintf(stderr, "AUBIO-TESTS WARNING: " __VA_ARGS__)
+#else
 #define PRINT_ERR(format, args...)   fprintf(stderr, "AUBIO-TESTS ERROR: " format , ##args)
 #define PRINT_MSG(format, args...)   fprintf(stdout, format , ##args)
 #define PRINT_DBG(format, args...)   fprintf(stderr, format , ##args)
 #define PRINT_WRN(format, args...)   fprintf(stderr, "AUBIO-TESTS WARNING: " format, ##args)
+#endif
 
 #ifdef HAVE_WIN_HACKS
 // http://en.wikipedia.org/wiki/Linear_congruential_generator