summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-22 09:32:07 +0100
committerBruno Haible <bruno@clisp.org>2019-12-22 09:32:37 +0100
commit0dfa3015c0cf4bb2fb21a06781dc4b5b326a855d (patch)
tree068454d900897f0ad7861ad4d0a4b114f11c14f2
parent9ba36dd358b128a79d0f7412b9dbdc7b6f6e4825 (diff)
downloadgnulib-0dfa3015c0cf4bb2fb21a06781dc4b5b326a855d.tar.gz
count-leading-zeros: Assume that the compiler supports 'long long'.
* lib/count-leading-zeros.h (count_leading_zeros_ll): Define unconditionally. * m4/count-leading-zeros.m4: Remove file. * modules/count-leading-zeros (Files): Remove it. (configure.ac): Don't invoke gl_COUNT_LEADING_ZEROS. * tests/test-count-leading-zeros.c (main): Test count_leading_zeros_ll unconditionally.
-rw-r--r--ChangeLog11
-rw-r--r--lib/count-leading-zeros.h2
-rw-r--r--m4/count-leading-zeros.m412
-rw-r--r--modules/count-leading-zeros2
-rw-r--r--tests/test-count-leading-zeros.c2
5 files changed, 11 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ac5ee6827..3e772e4f12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2019-12-22 Bruno Haible <bruno@clisp.org>
+ count-leading-zeros: Assume that the compiler supports 'long long'.
+ * lib/count-leading-zeros.h (count_leading_zeros_ll): Define
+ unconditionally.
+ * m4/count-leading-zeros.m4: Remove file.
+ * modules/count-leading-zeros (Files): Remove it.
+ (configure.ac): Don't invoke gl_COUNT_LEADING_ZEROS.
+ * tests/test-count-leading-zeros.c (main): Test count_leading_zeros_ll
+ unconditionally.
+
+2019-12-22 Bruno Haible <bruno@clisp.org>
+
localcharset: Update support for OpenBSD.
* lib/localcharset.c (alias_table): Map "US-ASCII" to "ASCII".
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h
index cf867acc53..ba573ca2df 100644
--- a/lib/count-leading-zeros.h
+++ b/lib/count-leading-zeros.h
@@ -100,7 +100,6 @@ count_leading_zeros_l (unsigned long int x)
COUNT_LEADING_ZEROS (__builtin_clzl, _BitScanReverse, unsigned long int);
}
-#if HAVE_UNSIGNED_LONG_LONG_INT
/* Compute and return the number of leading zeros in X. */
COUNT_LEADING_ZEROS_INLINE int
count_leading_zeros_ll (unsigned long long int x)
@@ -108,7 +107,6 @@ count_leading_zeros_ll (unsigned long long int x)
COUNT_LEADING_ZEROS (__builtin_clzll, _BitScanReverse64,
unsigned long long int);
}
-#endif
_GL_INLINE_HEADER_END
diff --git a/m4/count-leading-zeros.m4 b/m4/count-leading-zeros.m4
deleted file mode 100644
index efe31f9911..0000000000
--- a/m4/count-leading-zeros.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-# count-leading-zeros.m4 serial 2
-dnl Copyright (C) 2012-2019 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_COUNT_LEADING_ZEROS],
-[
- dnl We don't need (and can't compile) count_leading_zeros_ll
- dnl unless the type 'unsigned long long int' exists.
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-])
diff --git a/modules/count-leading-zeros b/modules/count-leading-zeros
index f6ec283cd7..09a910d862 100644
--- a/modules/count-leading-zeros
+++ b/modules/count-leading-zeros
@@ -4,14 +4,12 @@ Counts the number of leading 0-bits in a word.
Files:
lib/count-leading-zeros.c
lib/count-leading-zeros.h
-m4/count-leading-zeros.m4
Depends-on:
extern-inline
verify
configure.ac:
-gl_COUNT_LEADING_ZEROS
Makefile.am:
lib_SOURCES += count-leading-zeros.c
diff --git a/tests/test-count-leading-zeros.c b/tests/test-count-leading-zeros.c
index e94e37ef38..76f6f96379 100644
--- a/tests/test-count-leading-zeros.c
+++ b/tests/test-count-leading-zeros.c
@@ -68,10 +68,8 @@ main (int argc, char *argv[])
UINT_BIT, UINT_MAX, 1U);
TEST_COUNT_LEADING_ZEROS (count_leading_zeros_l, unsigned long int,
ULONG_BIT, ULONG_MAX, 1UL);
-#ifdef HAVE_UNSIGNED_LONG_LONG_INT
TEST_COUNT_LEADING_ZEROS (count_leading_zeros_ll, unsigned long long int,
ULLONG_BIT, ULLONG_MAX, 1ULL);
-#endif
return 0;
}