summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch
blob: 29768f34d24fafbf42b169e72377f78eade56d29 (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
Dont punish musl for glibc's trignometeric functions problems
additionally ensure that glibc specific macros are not used
unconditionally

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
Index: numpy-1.10.4/numpy/core/src/private/npy_config.h
===================================================================
--- numpy-1.10.4.orig/numpy/core/src/private/npy_config.h
+++ numpy-1.10.4/numpy/core/src/private/npy_config.h
@@ -75,10 +75,12 @@
 
 #if defined(HAVE_FEATURES_H)
 #include <features.h>
+#ifdef __GLIBC__
 #define TRIG_OK __GLIBC_PREREQ(2, 16)
 #else
 #define TRIG_OK 0
 #endif
+#endif
 
 #if !TRIG_OK
 #undef HAVE_CASIN
Index: numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
===================================================================
--- numpy-1.10.4.orig/numpy/core/src/npymath/ieee754.c.src
+++ numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
@@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void)
 }
 
 
-#elif defined(__GLIBC__) || defined(__APPLE__) || \
+#elif defined(__linux__) || defined(__APPLE__) || \
       defined(__CYGWIN__) || defined(__MINGW32__) || \
       (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
 #  include <fenv.h>