summaryrefslogtreecommitdiff
path: root/devel/check/patches/patch-ae
blob: b82343156170025eaebcfe60d585a013cf5b42ce (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-ae,v 1.1 2007/03/09 16:25:57 rillig Exp $

IRIX and HP/UX don't have strsignal.

Too few arguments to varargs macro.

--- tests/check_check_master.c.orig	Fri Mar  9 11:11:41 2007
+++ tests/check_check_master.c	Fri Mar  9 11:11:49 2007
@@ -86,6 +86,17 @@
 
 static int nr_of_master_tests = sizeof master_tests /sizeof master_tests[0];
 
+#if defined(__sgi)
+static const char *
+strsignal(int sig)
+{
+	static char signame[40];
+
+	sprintf(signame, "SIG#%d", sig);
+	return signame;
+}
+#endif
+
 START_TEST(test_check_nfailures)
 {
   int i;
@@ -123,9 +134,9 @@
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed);
+    fail_if(i - passed > sub_nfailed, NULL);
     tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL);
+    fail_unless(tr != NULL, NULL);
     got_msg = tr_msg(tr);
     expected_msg = master_tests[i].msg;
     if (strcmp(got_msg, expected_msg) != 0) {      
@@ -152,9 +163,9 @@
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed);
+    fail_if(i - passed > sub_nfailed, NULL);
     tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL);
+    fail_unless(tr != NULL, NULL);
     line_no = master_tests[i].line_nos;
     if (line_no > 0 && tr_lno(tr) != line_no) {
       char *emsg = malloc(MAXSTR);
@@ -179,9 +190,9 @@
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed);
+    fail_if(i - passed > sub_nfailed, NULL);
     tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL);
+    fail_unless(tr != NULL, NULL);
     fail_unless(master_tests[i].failure_type == tr_rtype(tr),
                 "Failure type wrong for test %d", i);
   }
@@ -193,7 +204,7 @@
   int i;
   for (i = 0; i < sub_nfailed; i++) {
     TestResult *tr = tr_fail_array[i];
-    fail_unless(tr != NULL);
+    fail_unless(tr != NULL, NULL);
     fail_unless(tr_lfile(tr) != NULL, "Bad file name for test %d", i);
     fail_unless(strstr(tr_lfile(tr), "check_check_sub.c") != 0,
                 "Bad file name for test %d", i);