diff --git a/src/IO/readDecimalText.h b/src/IO/readDecimalText.h index e3569cb471c..a34b08df1e5 100644 --- a/src/IO/readDecimalText.h +++ b/src/IO/readDecimalText.h @@ -1,9 +1,29 @@ #pragma once +#include #include #include +/// This is only needed for non-official, "unbundled" build. +/// https://stackoverflow.com/questions/41198673/uint128-t-not-working-with-clang-and-libstdc +#if !defined(_LIBCPP_LIMITS) && !defined(__GLIBCXX_BITSIZE_INT_N_0) && defined(__SIZEOF_INT128__) +namespace std +{ + template <> + struct numeric_limits<__int128_t> + { + static constexpr bool is_specialized = true; + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr int radix = 2; + static constexpr int digits = 127; + static constexpr int digits10 = 38; + }; +} +#endif + + namespace DB {