diff options
author | rillig <rillig> | 2007-03-09 16:25:56 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-03-09 16:25:56 +0000 |
commit | f10fde66a81e77a585eb96ef7105f4e65185c247 (patch) | |
tree | a431b6d87ead21dca553e5c70b510d8e4a31314f /devel/check | |
parent | b99aa76d7d54ff9f20c592d381b0fd11b666fed1 (diff) | |
download | pkgsrc-f10fde66a81e77a585eb96ef7105f4e65185c247.tar.gz |
Portability fixes for IRIX with MIPSpro.
Diffstat (limited to 'devel/check')
-rw-r--r-- | devel/check/distinfo | 7 | ||||
-rw-r--r-- | devel/check/patches/patch-ab | 96 | ||||
-rw-r--r-- | devel/check/patches/patch-ac | 26 | ||||
-rw-r--r-- | devel/check/patches/patch-ad | 24 | ||||
-rw-r--r-- | devel/check/patches/patch-ae | 71 |
5 files changed, 215 insertions, 9 deletions
diff --git a/devel/check/distinfo b/devel/check/distinfo index e6d0e506f4c..a38a53735e1 100644 --- a/devel/check/distinfo +++ b/devel/check/distinfo @@ -1,6 +1,9 @@ -$NetBSD: distinfo,v 1.10 2007/02/01 19:07:24 drochner Exp $ +$NetBSD: distinfo,v 1.11 2007/03/09 16:25:56 rillig Exp $ SHA1 (check-0.9.5.tar.gz) = 84b9d1ace6d0bf0fc73c9de2e684a62f73d312f8 RMD160 (check-0.9.5.tar.gz) = 1975578245444ffdc8cec43e53dedc3aac8553ea Size (check-0.9.5.tar.gz) = 520625 bytes -SHA1 (patch-ab) = 4f1bac549d48254f71fa03070b15a304d1fc4881 +SHA1 (patch-ab) = c42c564aea74984b8da2899819b0e250dbf610ec +SHA1 (patch-ac) = a10664d2af2c3cd4b01388846e9193206c4d93cb +SHA1 (patch-ad) = 1d15dd42e45b4201ab9efa24b70246c8451e4ab7 +SHA1 (patch-ae) = a4159f4c1a8150f7951afc07588f3e83f90e82b8 diff --git a/devel/check/patches/patch-ab b/devel/check/patches/patch-ab index a047aec371b..c595f1256c2 100644 --- a/devel/check/patches/patch-ab +++ b/devel/check/patches/patch-ab @@ -1,15 +1,97 @@ -$NetBSD: patch-ab,v 1.4 2006/09/24 10:30:41 rillig Exp $ +$NetBSD: patch-ab,v 1.5 2007/03/09 16:25:56 rillig Exp $ ---- tests/check_check_sub.c.orig 2005-07-19 14:46:26.000000000 +0200 -+++ tests/check_check_sub.c 2006-09-24 12:28:24.848798552 +0200 -@@ -104,7 +104,10 @@ END_TEST +Too few arguments to varargs macro. + +--- tests/check_check_sub.c.orig Tue Nov 21 18:19:15 2006 ++++ tests/check_check_sub.c Fri Mar 9 11:06:47 2007 +@@ -58,12 +58,13 @@ + } + END_TEST + +- ++#if defined(__GNUC__) + START_TEST(test_fail_no_msg) + { + fail_unless(4 == 5); + } + END_TEST ++#endif + START_TEST(test_fail_if_null_msg) + { +@@ -71,12 +72,13 @@ + } + END_TEST + +- ++#if defined(__GNUC__) + START_TEST(test_fail_if_no_msg) + { + fail_if(4 != 5); + } + END_TEST ++#endif + + START_TEST(test_fail_vararg_msg_1) + { +@@ -102,11 +104,13 @@ + } + END_TEST + ++#if defined(__GNUC__) START_TEST(test_fail_empty) { -+#if !defined(__SUNPRO_C) -+/* SunPro does not support the gcc-style __VA_ARGS__ use. */ fail(); -+#endif } END_TEST ++#endif + + START_TEST(test_segv) /* line 111 */ + { +@@ -201,7 +205,7 @@ + if((pid = fork()) < 0) { + fail("Failed to fork new process"); + } else if (pid > 0) { +- fail_unless(1); ++ fail_unless(1, NULL); + kill(pid, SIGKILL); + } else { + for (;;) { +@@ -237,7 +241,7 @@ + } else if (pid > 0) { + check_waitpid_and_exit(pid); + } else { +- fail_unless(1); ++ fail_unless(1, NULL); + check_waitpid_and_exit(0); + } + } +@@ -268,7 +272,7 @@ + if((pid2 = check_fork()) < 0) { + fail("Failed to fork new process"); + } else if (pid2 == 0) { +- fail_unless(1); ++ fail_unless(1, NULL); + check_waitpid_and_exit(0); + } + check_waitpid_and_exit(pid2); +@@ -361,13 +365,19 @@ + tcase_add_test (tc_simple, test_fail_if_pass); + tcase_add_test (tc_simple, test_fail_if_fail); + tcase_add_test (tc_simple, test_fail_null_msg); ++#if defined(__GNUC__) + tcase_add_test (tc_simple, test_fail_no_msg); ++#endif + tcase_add_test (tc_simple, test_fail_if_null_msg); ++#if defined(__GNUC__) + tcase_add_test (tc_simple, test_fail_if_no_msg); ++#endif + tcase_add_test (tc_simple, test_fail_vararg_msg_1); + tcase_add_test (tc_simple, test_fail_vararg_msg_2); + tcase_add_test (tc_simple, test_fail_vararg_msg_3); ++#if defined(__GNUC__) + tcase_add_test (tc_simple, test_fail_empty); ++#endif + tcase_add_test (tc_signal, test_segv); + tcase_add_test_raise_signal (tc_signal, test_segv, 11); /* pass */ diff --git a/devel/check/patches/patch-ac b/devel/check/patches/patch-ac new file mode 100644 index 00000000000..f3f123cf179 --- /dev/null +++ b/devel/check/patches/patch-ac @@ -0,0 +1,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 } diff --git a/devel/check/patches/patch-ad b/devel/check/patches/patch-ad new file mode 100644 index 00000000000..931086f7e61 --- /dev/null +++ b/devel/check/patches/patch-ad @@ -0,0 +1,24 @@ +$NetBSD: patch-ad,v 1.1 2007/03/09 16:25:57 rillig Exp $ + +IRIX and HP/UX don't have strsignal. + +--- src/check_run.c.orig Tue Nov 21 18:19:13 2006 ++++ src/check_run.c Fri Mar 9 10:51:17 2007 +@@ -85,6 +85,17 @@ + static int alarm_received; + static pid_t group_pid; + ++#if defined(__sgi) ++static const char * ++strsignal(int sig) ++{ ++ static char signame[40]; ++ ++ sprintf(signame, "SIG#%d", sig); ++ return signame; ++} ++#endif ++ + static void sig_handler(int sig_nr) + { + switch (sig_nr) { diff --git a/devel/check/patches/patch-ae b/devel/check/patches/patch-ae new file mode 100644 index 00000000000..b8234315617 --- /dev/null +++ b/devel/check/patches/patch-ae @@ -0,0 +1,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); |