Attempt to fix "Unbundled" build

This commit is contained in:
Alexey Milovidov 2020-08-07 14:18:41 +03:00
parent 0ac3f0481f
commit f74f5cfa06

View File

@ -1,9 +1,29 @@
#pragma once
#include <limits>
#include <IO/ReadHelpers.h>
#include <Common/intExp.h>
/// 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
{