tags 777788 + patch
thanks

Here's a fix for this build issue.  Note that there are different ways
to solve this, depending on which compilers / C standards you want to
support.  There's a really good description at
https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

Martin

-- 
Martin Michlmayr
Linux for HP Helion OpenStack, Hewlett-Packard
Here's a fix for this build issue.  Note that there are different ways
to solve this, depending on which compilers / C standards you want to
support.  There's a really good description at
https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

Martin


diff -urN a/autounit-0.20.1/debian/patches/30_gcc5_build_fix.patch autounit-0.20.1/debian/patches/30_gcc5_build_fix.patch
--- autounit-0.20.1/debian/patches/30_gcc5_build_fix.patch	1970-01-01 00:00:00.000000000 +0000
+++ autounit-0.20.1/debian/patches/30_gcc5_build_fix.patch	2015-06-25 12:49:45.118222413 +0000
@@ -0,0 +1,44 @@
+--- a/c-unit/autounit.h	2006-07-13 20:50:07.000000000 +0000
++++ b/c-unit/autounit.h	2015-06-25 12:48:20.690220665 +0000
+@@ -200,29 +200,29 @@
+ 
+ 
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+-#define au_assert(t, expr, err_msg, ...) au_assert_true(t, expr, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assert(t, expr, err_msg, ...) au_assert_true(t, expr, __FILE__, __LINE__, err_msg, ##__VA_ARGS__)
+ 
+-#define au_assert_fail(t, err_msg, ...) au_assert_true(t, 0, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assert_fail(t, err_msg, ...) au_assert_true(t, 0, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_assert_succeed(t, err_msg, ...) au_assert_true(t, 1, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assert_succeed(t, err_msg, ...) au_assert_true(t, 1, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_asserteq_str(t, str1, str2, err_msg, ...) au_assert_str_int(t, AU_REL_EQUAL, str1, str2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_asserteq_str(t, str1, str2, err_msg, ...) au_assert_str_int(t, AU_REL_EQUAL, str1, str2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_assertrel_str(t, type, str1, str2, err_msg, ...) au_assert_str_int(t, type, str1, str2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assertrel_str(t, type, str1, str2, err_msg, ...) au_assert_str_int(t, type, str1, str2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_asserteq_uint64(t, in1, in2, err_msg, ...) au_assert_guint64_int(t, AU_REL_EQUAL, in1, in2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_asserteq_uint64(t, in1, in2, err_msg, ...) au_assert_guint64_int(t, AU_REL_EQUAL, in1, in2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_assertrel_uint64(t, type, in1, in2, err_msg, ...) au_assert_guint64_int(t, type, in1, in2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assertrel_uint64(t, type, in1, in2, err_msg, ...) au_assert_guint64_int(t, type, in1, in2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_asserteq_int(t, in1, in2, err_msg, ...) au_assert_gint64_int(t, AU_REL_EQUAL, in1, in2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_asserteq_int(t, in1, in2, err_msg, ...) au_assert_gint64_int(t, AU_REL_EQUAL, in1, in2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_assertrel_int(t, type, in1, in2, err_msg, ...) au_assert_gint64_int(t, type, in1, in2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assertrel_int(t, type, in1, in2, err_msg, ...) au_assert_gint64_int(t, type, in1, in2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_asserteq_char(t, in1, in2, err_msg, ...) au_asserteq_char_int(t, in1, in2, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_asserteq_char(t, in1, in2, err_msg, ...) au_asserteq_char_int(t, in1, in2, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_asserteq_obj(t, ob1, ob2, compare_func, err_msg, ...) au_assert_obj_int(t, AU_REL_EQUAL, (gpointer)ob1, (gpointer)ob2, compare_func, 0, 0, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_asserteq_obj(t, ob1, ob2, compare_func, err_msg, ...) au_assert_obj_int(t, AU_REL_EQUAL, (gpointer)ob1, (gpointer)ob2, compare_func, 0, 0, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+-#define au_assertrel_obj(t, type, ob1, ob2, compare_func, err_msg, ...) au_assert_obj_int(t, type, (gpointer)ob1, (gpointer)ob2, compare_func, 0, 0, __FILE__, __LINE__, err_msg, __VA_ARGS__)
++#define au_assertrel_obj(t, type, ob1, ob2, compare_func, err_msg, ...) au_assert_obj_int(t, type, (gpointer)ob1, (gpointer)ob2, compare_func, 0, 0, __FILE__, __LINE__, err_msg, #__VA_ARGS__)
+ 
+ #define au_assert_null(t, ob1, err_msg, ...) au_assert(t, ob1 == 0, __FILE__, __LINE__, err_msg, __VA_ARGS__)
+ 
diff -urN a/autounit-0.20.1/debian/patches/series autounit-0.20.1/debian/patches/series
--- autounit-0.20.1/debian/patches/series	2012-02-27 10:04:50.000000000 +0000
+++ autounit-0.20.1/debian/patches/series	2015-06-25 12:44:01.198215295 +0000
@@ -2,3 +2,4 @@
 10_netstring.patch
 20_sv.po.patch
 22_linguas.patch
+30_gcc5_build_fix.patch

Reply via email to