diff options
author | Bruno Haible <bruno@clisp.org> | 2018-09-06 14:49:14 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-09-06 14:49:14 +0200 |
commit | 57bac80c66611ad64e50acaaa2a86a7f27cf2600 (patch) | |
tree | 323a7d7238d7f178c98e666eccf72fffd9e7e5bf | |
parent | 2bbce4309739a9b396f6839922f0e34ae757daf6 (diff) | |
download | gnulib-57bac80c66611ad64e50acaaa2a86a7f27cf2600.tar.gz |
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'.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | modules/count-leading-zeros-tests | 1 | ||||
-rw-r--r-- | tests/test-count-leading-zeros.c | 5 |
3 files changed, 14 insertions, 5 deletions
@@ -1,5 +1,18 @@ 2018-09-06 Bruno Haible <bruno@clisp.org> + 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 <bruno@clisp.org> + + 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 <bruno@clisp.org> + 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 1aff87beda..6f3ab4043a 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 0db9af66f1..4b3fc55524 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[]) { |