aports/community/llvm-libunwind/libcxx-musl.patch
Jakub Jirutka 7eee0c5c16 community/llvm-libunwind: revert unneeded/unwanted changes from prev commit
88f95eae5bb78a22aeb1811e269d511928986434

See comments in !25551
2021-10-19 15:13:35 +02:00

29 lines
1.3 KiB
Diff

Patch-Source: https://github.com/void-linux/void-packages/blob/74f16232621ca8dfb6d244beff1df35a6df1647f/srcpkgs/llvm12/patches/libcxx-musl.patch
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
typename remove_reference<decltype(errno)>::type __save_errno = errno;
errno = 0;
char *__p2;
+#if defined(__linux__) && !defined(__GLIBC__)
+ long long __ll = strtoll(__a, &__p2, __base);
+#else
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+#endif
typename remove_reference<decltype(errno)>::type __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
typename remove_reference<decltype(errno)>::type __save_errno = errno;
errno = 0;
char *__p2;
+#if defined(__linux__) && !defined(__GLIBC__)
+ unsigned long long __ll = strtoull(__a, &__p2, __base);
+#else
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+#endif
typename remove_reference<decltype(errno)>::type __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;