>From 57bac80c66611ad64e50acaaa2a86a7f27cf2600 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 6 Sep 2018 14:49:14 +0200 Subject: [PATCH 4/5] count-leading-zeros tests: Rely on limits-h module. * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback definition. * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'. --- ChangeLog | 13 +++++++++++++ modules/count-leading-zeros-tests | 1 + tests/test-count-leading-zeros.c | 5 ----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6eb3027..460fa9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 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. + * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'. + +2018-09-06 Bruno Haible + + count-one-bits tests: Rely on limits-h module. + * tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition. + * modules/count-one-bits-tests (Depends-on): Add 'limits-h'. + +2018-09-06 Bruno Haible + xstrtoll: Rely on limits-h module. * lib/xstrtol.c: Don't include intprops.h. (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions. diff --git a/modules/count-leading-zeros-tests b/modules/count-leading-zeros-tests index 1aff87b..6f3ab40 100644 --- a/modules/count-leading-zeros-tests +++ b/modules/count-leading-zeros-tests @@ -3,6 +3,7 @@ tests/test-count-leading-zeros.c tests/macros.h Depends-on: +limits-h configure.ac: diff --git a/tests/test-count-leading-zeros.c b/tests/test-count-leading-zeros.c index 0db9af6..4b3fc55 100644 --- a/tests/test-count-leading-zeros.c +++ b/tests/test-count-leading-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