>From a340c8f8ea0c52dc6196346b6b12a3a96baa387f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 6 Sep 2018 14:50:04 +0200 Subject: [PATCH 5/5] count-trailing-zeros tests: Rely on limits-h module. * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback definition. * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'. --- ChangeLog | 7 +++++++ modules/count-trailing-zeros-tests | 1 + tests/test-count-trailing-zeros.c | 5 ----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 460fa9f..a66610f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2018-09-06 Bruno Haible + count-trailing-zeros tests: Rely on limits-h module. + * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback + definition. + * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'. + +2018-09-06 Bruno Haible + count-leading-zeros tests: Rely on limits-h module. * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback definition. diff --git a/modules/count-trailing-zeros-tests b/modules/count-trailing-zeros-tests index 88b2d0a..1b7e638 100644 --- a/modules/count-trailing-zeros-tests +++ b/modules/count-trailing-zeros-tests @@ -3,6 +3,7 @@ tests/test-count-trailing-zeros.c tests/macros.h Depends-on: +limits-h configure.ac: diff --git a/tests/test-count-trailing-zeros.c b/tests/test-count-trailing-zeros.c index 6edd550..862e57d 100644 --- a/tests/test-count-trailing-zeros.c +++ b/tests/test-count-trailing-zeros.c @@ -29,11 +29,6 @@ #define ULONG_BIT (sizeof (unsigned long int) * CHAR_BIT) #define ULLONG_BIT (sizeof (unsigned long long int) * CHAR_BIT) -#ifndef ULLONG_MAX -# define HALF (1ULL << (sizeof (unsigned long long int) * CHAR_BIT - 1)) -# define ULLONG_MAX (HALF - 1 + HALF) -#endif - int main (int argc, char *argv[]) { -- 2.7.4