changeset 39824:87e523c3d063

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