changeset 39823:8d6b7f9dda89

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'.
author Bruno Haible <bruno@clisp.org>
date Thu, 06 Sep 2018 14:49:14 +0200
parents 42f02b3c8b20
children 87e523c3d063
files ChangeLog modules/count-leading-zeros-tests tests/test-count-leading-zeros.c
diffstat 3 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 06 14:48:00 2018 +0200
+++ b/ChangeLog	Thu Sep 06 14:49:14 2018 +0200
@@ -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.
--- a/modules/count-leading-zeros-tests	Thu Sep 06 14:48:00 2018 +0200
+++ b/modules/count-leading-zeros-tests	Thu Sep 06 14:49:14 2018 +0200
@@ -3,6 +3,7 @@
 tests/macros.h
 
 Depends-on:
+limits-h
 
 configure.ac:
 
--- a/tests/test-count-leading-zeros.c	Thu Sep 06 14:48:00 2018 +0200
+++ b/tests/test-count-leading-zeros.c	Thu Sep 06 14:49:14 2018 +0200
@@ -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[])
 {