mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 1269cab21a into merged_master (Bitcoin PR #19403)
This commit is contained in:
commit
e2677ef2dc
3 changed files with 17 additions and 15 deletions
|
|
@ -137,18 +137,6 @@
|
|||
don't. */
|
||||
#define HAVE_DECL_STRNLEN 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `__builtin_clz', and to 0 if you
|
||||
don't. */
|
||||
//#define HAVE_DECL___BUILTIN_CLZ 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `__builtin_clzl', and to 0 if
|
||||
you don't. */
|
||||
//#define HAVE_DECL___BUILTIN_CLZL 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `__builtin_clzll', and to 0 if
|
||||
you don't. */
|
||||
//#define HAVE_DECL___BUILTIN_CLZLL 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
|
|
|
|||
16
configure.ac
16
configure.ac
|
|
@ -875,7 +875,21 @@ AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
|
|||
#include <byteswap.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll])
|
||||
AC_MSG_CHECKING(for __builtin_clzl)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
|
||||
(void) __builtin_clzl(0);
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BUILTIN_CLZL, 1, [Define this symbol if you have __builtin_clzl])],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for __builtin_clzll)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
|
||||
(void) __builtin_clzll(0);
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BUILTIN_CLZLL, 1, [Define this symbol if you have __builtin_clzll])],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl Check for malloc_info (for memory statistics information in getmemoryinfo)
|
||||
AC_MSG_CHECKING(for getmemoryinfo)
|
||||
|
|
|
|||
|
|
@ -82,12 +82,12 @@ void static inline WriteBE64(unsigned char* ptr, uint64_t x)
|
|||
/** Return the smallest number n such that (x >> n) == 0 (or 64 if the highest bit in x is set. */
|
||||
uint64_t static inline CountBits(uint64_t x)
|
||||
{
|
||||
#if HAVE_DECL___BUILTIN_CLZL
|
||||
#if HAVE_BUILTIN_CLZL
|
||||
if (sizeof(unsigned long) >= sizeof(uint64_t)) {
|
||||
return x ? 8 * sizeof(unsigned long) - __builtin_clzl(x) : 0;
|
||||
}
|
||||
#endif
|
||||
#if HAVE_DECL___BUILTIN_CLZLL
|
||||
#if HAVE_BUILTIN_CLZLL
|
||||
if (sizeof(unsigned long long) >= sizeof(uint64_t)) {
|
||||
return x ? 8 * sizeof(unsigned long long) - __builtin_clzll(x) : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue