aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libcxx/files/libcxx-3.7.0-musl-compatibility.patch')
-rw-r--r--sys-libs/libcxx/files/libcxx-3.7.0-musl-compatibility.patch70
1 files changed, 0 insertions, 70 deletions
diff --git a/sys-libs/libcxx/files/libcxx-3.7.0-musl-compatibility.patch b/sys-libs/libcxx/files/libcxx-3.7.0-musl-compatibility.patch
deleted file mode 100644
index 5e223bf8..00000000
--- a/sys-libs/libcxx/files/libcxx-3.7.0-musl-compatibility.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -Naur libcxx-3.7.0.src.orig/include/__config libcxx-3.7.0.src/include/__config
---- libcxx-3.7.0.src.orig/include/__config 2015-07-17 00:58:59.000000000 +0000
-+++ libcxx-3.7.0.src/include/__config 2015-09-19 07:56:55.295497669 +0000
-@@ -355,14 +355,10 @@
- #define _LIBCPP_HAS_QUICK_EXIT
- #elif defined(__linux__)
- #include <features.h>
--#if __GLIBC_PREREQ(2, 15)
- #define _LIBCPP_HAS_QUICK_EXIT
--#endif
--#if __GLIBC_PREREQ(2, 17)
- #define _LIBCPP_HAS_C11_FEATURES
- #endif
- #endif
--#endif
-
- #if (__has_feature(cxx_noexcept))
- # define _NOEXCEPT noexcept
-diff -Naur libcxx-3.7.0.src.orig/include/locale libcxx-3.7.0.src/include/locale
---- libcxx-3.7.0.src.orig/include/locale 2015-09-19 08:02:51.101497669 +0000
-+++ libcxx-3.7.0.src/include/locale 2015-09-19 07:24:18.635497669 +0000
-@@ -11,6 +11,15 @@
- #ifndef _LIBCPP_LOCALE
- #define _LIBCPP_LOCALE
-
-+// musl doesn't define _l (with locale) variants of functions, as it only supports UTF-8.
-+// we can simply make macros that will call the non-localated ones if we're using musl, or rather not-using something that has the _l ones.
-+// couldn't find anything glibc #defines when it creates strtoull_l (that it doesn't undefine a few lines later), so let's test against glibc and glibc-likes.
-+// almost all glibc-likes define __GNU_LIBRARY__ for compatibility
-+#ifndef __GNU_LIBRARY__
-+#define strtoull_l(A, B, C, LOC) strtoull(A,B,C)
-+#define strtoll_l(A, B, C, LOC) strtoll(A,B,C)
-+#endif
-+
- /*
- locale synopsis
-
-diff -Naur libcxx-3.7.0.src.orig/src/locale.cpp libcxx-3.7.0.src/src/locale.cpp
---- libcxx-3.7.0.src.orig/src/locale.cpp 2015-07-06 15:39:36.000000000 +0000
-+++ libcxx-3.7.0.src/src/locale.cpp 2015-09-19 07:59:59.979497669 +0000
-@@ -1012,11 +1012,10 @@
- return low;
- }
-
--#ifdef __EMSCRIPTEN__
-+// we want this either way
- extern "C" const unsigned short ** __ctype_b_loc();
- extern "C" const int ** __ctype_tolower_loc();
- extern "C" const int ** __ctype_toupper_loc();
--#endif
-
- #ifdef _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
- const ctype<char>::mask*
-@@ -1122,12 +1121,10 @@
- #elif defined(_AIX)
- return (const unsigned int *)__lc_ctype_ptr->obj->mask;
- #else
-- // Platform not supported: abort so the person doing the port knows what to
-- // fix
--# warning ctype<char>::classic_table() is not implemented
-- printf("ctype<char>::classic_table() is not implemented\n");
-- abort();
-- return NULL;
-+// not sure any other libc like this exists, but there is no way to differentiate musl as of right now
-+// to be fair, with the change above, this should always work
-+// also, #warning is a gcc extension
-+ return (const unsigned long *)*__ctype_b_loc();
- #endif
- }
- #endif