]> Savannah Git Hosting - gnulib.git/commitdiff
count-leading-zeros tests: Rely on limits-h module.
authorBruno Haible <bruno@clisp.org>
Thu, 6 Sep 2018 12:49:14 +0000 (14:49 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 6 Sep 2018 12:49:14 +0000 (14:49 +0200)
* tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback
definition.
* modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.

ChangeLog
modules/count-leading-zeros-tests
tests/test-count-leading-zeros.c

index 6eb30276dfd960716728835be94e905227396e5f..460fa9f306bcb26bb60d6416d0d67c28ecef5829 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.
index 1aff87bedae5d390c8cceb009d139e61ba28f01a..6f3ab4043ab30a79404269e67e7b3687955e0991 100644 (file)
@@ -3,6 +3,7 @@ tests/test-count-leading-zeros.c
 tests/macros.h
 
 Depends-on:
+limits-h
 
 configure.ac:
 
index 0db9af66f1693150b56d4d9f841b708003e487ce..4b3fc5552486b581a90aaedc9bc4229ff66d00a4 100644 (file)
 #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[])
 {