]> granicus.if.org Git - check/commitdiff
Fixed gcc 2.95.3 compatibility for VA_ARGS in fail_if
authorhugo303 <hugo303@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 29 Mar 2005 14:30:06 +0000 (14:30 +0000)
committerhugo303 <hugo303@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Tue, 29 Mar 2005 14:30:06 +0000 (14:30 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@228 64e312b2-a51f-0410-8e61-82d0ca0eb02a

check/ChangeLog
check/src/check.h.in

index 44ab5e85d998d7f234059f247d7867baf66f6360..9cdb9df988cf81f1c8e27eaaab50bffae5887d7e 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-29 hugo303
+
+       * src/check.h.in: Fixed compatibility with gcc 2.95.3 according
+       to sourceforge patch #1161654.
+
 2005-03-02 hugo303
 
        * src/check.h.in: Added define for NULL if needed.
index 594f5c2eebef6fd23de7e05e1b852c5bcec17f7f..657363de17e83ae5cf9924cd9267d340ed5bd954 100644 (file)
@@ -164,14 +164,20 @@ static void __testname (void)\
 #define END_TEST }
 
 /* Fail the test case unless expr is true */
+/* The space before the comma sign before ## is essential to be compatible
+   with gcc 2.95.3 and earlier.
+*/
 #define fail_unless(expr, ...)\
         _fail_unless(expr, __FILE__, __LINE__,\
         "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
 
 /* Fail the test case if expr is true */
+/* The space before the comma sign before ## is essential to be compatible
+   with gcc 2.95.3 and earlier.
+*/
 #define fail_if(expr, ...)\
         _fail_unless(!(expr), __FILE__, __LINE__,\
-        "Failure '"#expr"' occured", ## __VA_ARGS__, NULL)
+        "Failure '"#expr"' occured" , ## __VA_ARGS__, NULL)
 
 /* Always fail */
 #define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)