This is an automated email from the ASF dual-hosted git repository.

wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a9d91a3 fix: move int128_t and uint128_t aliases into the iceberg 
namespace (#972)
5a9d91a3 is described below

commit 5a9d91a399f00a691fb2498720414c0e455d967b
Author: rohanjain101 <[email protected]>
AuthorDate: Fri Oct 9 07:28:30 2026 -0700

    fix: move int128_t and uint128_t aliases into the iceberg namespace (#972)
    
    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.
    
    Co-authored-by: Rohan Jain <[email protected]>
---
 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 8e9d27dc..3fff02b1 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

Reply via email to