summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/files/0001-replace-strtoll_l-with-strtoll-on-musl.patch
blob: 6e8404dbcd4cbc2889e56c300d77cd5ee962bf3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From 103e1e99622318a6183c4576d372cc8126c6778d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Mar 2016 04:20:10 +0000
Subject: [PATCH] replace strtoll_l with strtoll on musl

Fixes errors like
libcxx/include/locale:874:26: error: use of undeclared identifier 'strtoll_l'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 include/locale | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/locale b/include/locale
index 84cb5a5..9072722 100644
--- a/include/locale
+++ b/include/locale
@@ -10,7 +10,6 @@
 
 #ifndef _LIBCPP_LOCALE
 #define _LIBCPP_LOCALE
-
 /*
     locale synopsis
 
@@ -871,7 +870,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
         typename remove_reference<decltype(errno)>::type __save_errno = errno;
         errno = 0;
         char *__p2;
-        long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+        long long __ll = strtoll(__a, &__p2, __base);
         typename remove_reference<decltype(errno)>::type __current_errno = errno;
         if (__current_errno == 0)
             errno = __save_errno;
@@ -911,7 +910,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
         typename remove_reference<decltype(errno)>::type __save_errno = errno;
         errno = 0;
         char *__p2;
-        unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+        unsigned long long __ll = strtoull(__a, &__p2, __base);
         typename remove_reference<decltype(errno)>::type __current_errno = errno;
         if (__current_errno == 0)
             errno = __save_errno;
@@ -941,7 +940,7 @@ __num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
         typename remove_reference<decltype(errno)>::type __save_errno = errno;
         errno = 0;
         char *__p2;
-        long double __ld = strtold_l(__a, &__p2, _LIBCPP_GET_C_LOCALE);
+        long double __ld = strtold(__a, &__p2);
         typename remove_reference<decltype(errno)>::type __current_errno = errno;
         if (__current_errno == 0)
             errno = __save_errno;
-- 
1.9.1