From db99103ddabc47d619030321f45385989e17d2d0 Mon Sep 17 00:00:00 2001 From: Rohan Jain Date: Tue, 29 Sep 2026 16:03:02 -0400 Subject: [PATCH] fix: move int128_t and uint128_t aliases into the iceberg namespace The aliases were declared at global scope in the public header iceberg/util/int128.h. Any consumer that includes an iceberg header then gets global int128_t and uint128_t names, which conflict with other libraries or application code that define the same names. All uses in the project are already inside namespace iceberg, so this change is source compatible within the project. --- src/iceberg/util/int128.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/iceberg/util/int128.h b/src/iceberg/util/int128.h index 8e9d27dc7..3fff02b1c 100644 --- a/src/iceberg/util/int128.h +++ b/src/iceberg/util/int128.h @@ -24,11 +24,18 @@ #if defined(_MSC_VER) # include <__msvc_int128.hpp> +#elif !defined(__GNUC__) && !defined(__clang__) +# error "128-bit integer type is not supported on this platform" +#endif + +namespace iceberg { + +#if defined(_MSC_VER) using int128_t = std::_Signed128; using uint128_t = std::_Unsigned128; -#elif defined(__GNUC__) || defined(__clang__) +#else using int128_t = __int128; using uint128_t = unsigned __int128; -#else -# error "128-bit integer type is not supported on this platform" #endif + +} // namespace iceberg