diff options
author | Bruno Haible <bruno@clisp.org> | 2018-09-06 14:50:04 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-09-06 14:50:04 +0200 |
commit | a340c8f8ea0c52dc6196346b6b12a3a96baa387f (patch) | |
tree | 78b01740a71f47efbb92dad3c82f5570ee0021c8 | |
parent | 57bac80c66611ad64e50acaaa2a86a7f27cf2600 (diff) | |
download | gnulib-a340c8f8ea0c52dc6196346b6b12a3a96baa387f.tar.gz |
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'.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | modules/count-trailing-zeros-tests | 1 | ||||
-rw-r--r-- | tests/test-count-trailing-zeros.c | 5 |
3 files changed, 8 insertions, 5 deletions
@@ -1,5 +1,12 @@ 2018-09-06 Bruno Haible <bruno@clisp.org> + 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 <bruno@clisp.org> + 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 88b2d0a4ee..1b7e6385f7 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 6edd55047c..862e57d331 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[]) { |