summaryrefslogtreecommitdiff
path: root/devel/check/patches/patch-ac
blob: f3f123cf1794c8737b56dc574f044b85d611ebfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-ac,v 1.1 2007/03/09 16:25:56 rillig Exp $

Too few arguments to varargs macro.

Not every compiler knows __attribute__.

--- src/check.h.in.orig	Fri Mar  9 10:56:14 2007
+++ src/check.h.in	Fri Mar  9 10:55:11 2007
@@ -173,10 +173,17 @@
 /* Start a unit test with START_TEST(unit_name), end with END_TEST
    One must use braces within a START_/END_ pair to declare new variables
 */ 
+#if defined(__GNUC__)
 #define START_TEST(__testname)\
 static void __testname (int _i __attribute__((unused)))\
 {\
   tcase_fn_start (""# __testname, __FILE__, __LINE__);
+#else
+#define START_TEST(__testname)\
+static void __testname (int _i)\
+{\
+  tcase_fn_start (""# __testname, __FILE__, __LINE__);
+#endif
 
 /* End a unit test */
 #define END_TEST }