summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch')
-rw-r--r--meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch b/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
new file mode 100644
index 0000000000..08cb078fad
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
@@ -0,0 +1,47 @@
1From 154b2c19f392817a936aea0190e276f8228cb489 Mon Sep 17 00:00:00 2001
2From: "Erik M. Bray" <erik.bray@lri.fr>
3Date: Mon, 12 Dec 2016 13:07:16 +0100
4Subject: [PATCH] BUG: xlocale.h is not available in newlib--all the defines
5 used here from xlocale.h are instead found in locale.h
6
7Added a feature check for xlocale.h, with fallback to locale.h if it is
8missing.
9---
10 numpy/core/setup_common.py | 1 +
11 numpy/core/src/multiarray/numpyos.c | 8 +++++++-
12 2 files changed, 8 insertions(+), 1 deletion(-)
13
14Upstream-Status: Backport
15RP 2017/9/6
16
17diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
18index ba7521e3043..a1729e65656 100644
19--- a/numpy/core/setup_common.py
20+++ b/numpy/core/setup_common.py
21@@ -113,6 +113,7 @@ def check_api_version(apiversion, codegen_dir):
22 "xmmintrin.h", # SSE
23 "emmintrin.h", # SSE2
24 "features.h", # for glibc version linux
25+ "xlocale.h" # see GH#8367
26 ]
27
28 # optional gcc compiler builtins and their call arguments and optional a
29diff --git a/numpy/core/src/multiarray/numpyos.c b/numpy/core/src/multiarray/numpyos.c
30index 450ec40b6e0..84617ea78c3 100644
31--- a/numpy/core/src/multiarray/numpyos.c
32+++ b/numpy/core/src/multiarray/numpyos.c
33@@ -15,7 +15,13 @@
34
35 #ifdef HAVE_STRTOLD_L
36 #include <stdlib.h>
37-#include <xlocale.h>
38+#ifdef HAVE_XLOCALE_H
39+ /*
40+ * the defines from xlocale.h are included in locale.h on some sytems;
41+ * see gh-8367
42+ */
43+ #include <xlocale.h>
44+#endif
45 #endif
46
47