From 903f64b394b002aca56f4946d2212002d2d64362 Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Sun, 20 Oct 2019 11:26:04 +0200 Subject: [PATCH 1/6] Fix required C standard from C90 to C99 We are using C99 features, such as anonymous variadic macros and mixed declarations and code. Besides, we are using POSIX extensions (fork, etc.), so there is (probably?) no point in forcing the use of the old ANSI C89 / ISO C90. Signed-off-by: Mikko Johannes Koivunalho --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4176af1..7a017f82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,8 +61,8 @@ set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT include(GNUInstallDirs) ############################################################################### -# Adhere strictly to old ANSI C89 / ISO C90 standard -set(CMAKE_C_STANDARD 90) +# Follow ISO C99 standard +set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) # Use GNU extensions and POSIX standard From f4d5b71e25091186081a52ed9528dfd6baf5dad5 Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Sun, 20 Oct 2019 11:46:33 +0200 Subject: [PATCH 2/6] Add missing include for waitpid() Signed-off-by: Mikko Johannes Koivunalho --- src/check_run.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_run.c b/src/check_run.c index 7e212e02..2d0a7089 100644 --- a/src/check_run.c +++ b/src/check_run.c @@ -29,6 +29,10 @@ #include #include +#if defined(HAVE_FORK) && HAVE_FORK==1 +# include +#endif + #include "check.h" #include "check_error.h" #include "check_list.h" From eb3e1b19cb68484a1684cd8dae7a0a2a39d6b588 Mon Sep 17 00:00:00 2001 From: Mikko Johannes Koivunalho Date: Sun, 20 Oct 2019 11:41:27 +0200 Subject: [PATCH 3/6] Change C++ style comments to C style Signed-off-by: Mikko Johannes Koivunalho --- src/check_pack.c | 2 +- tests/check_check_master.c | 4 ++-- tests/check_check_sub.c | 6 +++--- tests/check_set_max_msg_size.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/check_pack.c b/src/check_pack.c index d815d784..f3858ff3 100644 --- a/src/check_pack.c +++ b/src/check_pack.c @@ -62,7 +62,7 @@ static size_t get_max_msg_size(void) size_t value = 0; char *env = getenv("CK_MAX_MSG_SIZE"); if (env) - value = (size_t)strtoul(env, NULL, 10); // Cast in case size_t != unsigned long. + value = (size_t)strtoul(env, NULL, 10); /* Cast in case size_t != unsigned long. */ if (value == 0) value = ck_max_msg_size; if (value == 0) diff --git a/tests/check_check_master.c b/tests/check_check_master.c index e7c38c71..6e40c783 100644 --- a/tests/check_check_master.c +++ b/tests/check_check_master.c @@ -43,10 +43,10 @@ char * line_num_failures_file_name = NULL; enum ck_test_msg_type_t { #if ENABLE_REGEX - // For tests with different output on different platforms + /* For tests with different output on different platforms */ CK_MSG_REGEXP, #endif - // Simple text + /* Simple text */ CK_MSG_TEXT }; diff --git a/tests/check_check_sub.c b/tests/check_check_sub.c index a6f8f272..ddfea1d2 100644 --- a/tests/check_check_sub.c +++ b/tests/check_check_sub.c @@ -936,7 +936,7 @@ START_TEST(test_ck_assert_float_finite) record_test_name(tcase_name()); ck_assert_float_finite(x); - // MS VS doesn't allow explicit division by zero + /* MS VS doesn't allow explicit division by zero */ x = 1.0f / (1.0f - t); record_failure_line_num(__LINE__); ck_assert_float_finite(x); @@ -1452,7 +1452,7 @@ START_TEST(test_ck_assert_double_finite) record_test_name(tcase_name()); ck_assert_double_finite(x); - // MS VS doesn't allow explicit division by zero + /* MS VS doesn't allow explicit division by zero */ x = 1.0 / (1.0 - t); record_failure_line_num(__LINE__); ck_assert_double_finite(x); @@ -1970,7 +1970,7 @@ START_TEST(test_ck_assert_ldouble_finite) record_test_name(tcase_name()); ck_assert_ldouble_finite(x); - // MS VS doesn't allow explicit division by zero + /* MS VS doesn't allow explicit division by zero */ x = 1.0l / (1.0l - t); record_failure_line_num(__LINE__); ck_assert_ldouble_finite(x); diff --git a/tests/check_set_max_msg_size.c b/tests/check_set_max_msg_size.c index 6ebfc8e4..92a3bab5 100644 --- a/tests/check_set_max_msg_size.c +++ b/tests/check_set_max_msg_size.c @@ -64,8 +64,8 @@ int main (int argc, char *argv[]) * Run the test suite. This is intended to trigger the "Message is too long" error. * Actual success/failure is determined by examining the output. */ - check_set_max_msg_size(32); // 1st call has no effect since - check_set_max_msg_size(atoi(argv[1])); // the 2nd call will override it. + check_set_max_msg_size(32); /* 1st call has no effect since */ + check_set_max_msg_size(atoi(argv[1])); /* the 2nd call will override it. */ sr = srunner_create(make_set_max_msg_size_suite()); srunner_run_all(sr, CK_NORMAL); srunner_free(sr); From 0fc33bd6adebe95effcdc2c2aa351033f3298e1e Mon Sep 17 00:00:00 2001 From: Branden Archer Date: Mon, 21 Oct 2019 22:06:56 -0700 Subject: [PATCH 4/6] Update index.html for 0.13.0 release --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index ec00aec7..a0652887 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@

Latest Check Release

-Oct 20, 2017: Check 0.12.0 +Oct 20, 2019: Check 0.13.0 is now available for download. Check is available under the LGPL license. New features available in this release are listed on the NEWS page. From a1890f63ee1fa60ab3bfa8b2a2959a05de32afe8 Mon Sep 17 00:00:00 2001 From: Branden Archer Date: Mon, 21 Oct 2019 22:08:14 -0700 Subject: [PATCH 5/6] Restore development header in NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 84957df2..1a902427 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +In Development: +# Mentioning Check 0.13.0 for now, to fix distcheck target until next release + + Sat Oct 20, 2019: Released Check 0.13.0 based on hash 2b18886a9a9d3bab44917a550d12128ad7e2c197 From 711da1ec4249ec5724dc703d4d06f5281b3c30a1 Mon Sep 17 00:00:00 2001 From: Branden Archer Date: Mon, 21 Oct 2019 22:09:17 -0700 Subject: [PATCH 6/6] Fix typo in NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1a902427..10a11d70 100644 --- a/NEWS +++ b/NEWS @@ -11,7 +11,7 @@ Sat Oct 20, 2019: Released Check 0.13.0 * missing in some files Issue #196 and Issue #186 (GitHub) -* Varous documentation improvements +* Various documentation improvements * END_TEST is now optional, as how START_TEST works has been redone Issue #158