summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-09-06 14:49:14 +0200
committerBruno Haible <bruno@clisp.org>2018-09-06 14:49:14 +0200
commit57bac80c66611ad64e50acaaa2a86a7f27cf2600 (patch)
tree323a7d7238d7f178c98e666eccf72fffd9e7e5bf
parent2bbce4309739a9b396f6839922f0e34ae757daf6 (diff)
downloadgnulib-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--ChangeLog13
-rw-r--r--modules/count-leading-zeros-tests1
-rw-r--r--tests/test-count-leading-zeros.c5
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6eb30276df..460fa9f306 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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[])
{