From 78d2c244f96c33d0e581c3ce07aa9572a000fe49 Mon Sep 17 00:00:00 2001 From: ZERICO2005 <71151164+ZERICO2005@users.noreply.github.com> Date: Sat, 1 Feb 2025 19:31:41 -0700 Subject: [PATCH] Fixed the C++ overloads for intmax_t abs and div --- src/libcxx/include/cinttypes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcxx/include/cinttypes b/src/libcxx/include/cinttypes index 800d47f10..894d7f498 100644 --- a/src/libcxx/include/cinttypes +++ b/src/libcxx/include/cinttypes @@ -12,10 +12,12 @@ namespace std { using ::imaxdiv_t; using ::imaxabs; -inline constexpr intmax_t abs(intmax_t __x) { return imaxabs(__x); } - using ::imaxdiv; + +#if __INTMAX_WIDTH__ > __LLONG_WIDTH__ +inline constexpr intmax_t abs(intmax_t __x) { return imaxabs(__x); } inline constexpr imaxdiv_t div(intmax_t __x, intmax_t __y) { return imaxdiv(__x, __y); } +#endif // __INTMAX_WIDTH__ > __LLONG_WIDTH__ } // namespace std