Merge bitcoin/bitcoin#23761: build: use __SIZEOF_INT128__ for checking __int128 availability

e9440aeb5c build: use __SIZEOF_INT128__ for checking __int128 availability (fanquake)

Pull request description:

  We already use this in the blockfilter code,

  bf66e258a8/src/blockfilter.cpp (L34-L36)

  so not sure we need to maintain two different ways of testing
  for the same functionality. Consolidate on testing for `__SIZEOF_INT128__`,
  which we already use, is supported by the compilers we care about, and is
  also used by libsecp256k1.

ACKs for top commit:
  sipa:
    utACK e9440aeb5c
  Zero-1729:
    crACK e9440aeb5c

Tree-SHA512: 8aeef1734486a863b5091123bb5f9ba8868b1e2b4b35114586e3eb5862a38d4a1518ed069f37f41cb5e5ce2f6c87d95671996366d5ee990e0c90f268a8978ba3
This commit is contained in:
MarcoFalke 2021-12-13 17:10:26 +01:00
commit 42796742a4
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
2 changed files with 1 additions and 4 deletions

View file

@ -837,9 +837,6 @@ if test "$use_lcov_branch" != "no"; then
AC_SUBST(LCOV_OPTS, "$LCOV_OPTS --rc lcov_branch_coverage=1")
fi
dnl Check for __int128
AC_CHECK_TYPES([__int128])
dnl Check for endianness
AC_C_BIGENDIAN

View file

@ -24,7 +24,7 @@ private:
public:
static constexpr size_t BYTE_SIZE = 384;
#ifdef HAVE___INT128
#ifdef __SIZEOF_INT128__
typedef unsigned __int128 double_limb_t;
typedef uint64_t limb_t;
static constexpr int LIMBS = 48;