The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python-numpy / 0001-no-fenv-on-uclibc.patch
1 Don't use <fenv.h> on uClibc
2
3 The python-numpy code already has provisions to not use <fenv.h> when
4 not available. However, it uses __GLIBC__ to know whether fenv.h is
5 available or not, but uClibc defines __GLIBC__, so python-numpy thinks
6 fenv.h is available.
7
8 This patch fixes that by changing all defined(__GLIBC__) occurences by
9 (defined(__GLIBC__) && !defined(__UCLIBC__)).
10
11 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12
13 Index: b/numpy/core/include/numpy/ufuncobject.h
14 ===================================================================
15 --- a/numpy/core/include/numpy/ufuncobject.h
16 +++ b/numpy/core/include/numpy/ufuncobject.h
17 @@ -413,11 +413,11 @@
18          (void) fpsetsticky(0); \
19          }
20  
21 -#elif defined(__GLIBC__) || defined(__APPLE__) || \
22 +#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
23        defined(__CYGWIN__) || defined(__MINGW32__) || \
24        (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
25  
26 -#if defined(__GLIBC__) || defined(__APPLE__) || \
27 +#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
28      defined(__MINGW32__) || defined(__FreeBSD__)
29  #include <fenv.h>
30  #elif defined(__CYGWIN__)
31 Index: b/numpy/core/src/npymath/ieee754.c.src
32 ===================================================================
33 --- a/numpy/core/src/npymath/ieee754.c.src
34 +++ b/numpy/core/src/npymath/ieee754.c.src
35 @@ -586,11 +586,11 @@
36  }
37  
38  
39 -#elif defined(__GLIBC__) || defined(__APPLE__) || \
40 +#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
41        defined(__CYGWIN__) || defined(__MINGW32__) || \
42        (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
43  
44 -# if defined(__GLIBC__) || defined(__APPLE__) || \
45 +# if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
46       defined(__MINGW32__) || defined(__FreeBSD__)
47  #  include <fenv.h>
48  # elif defined(__CYGWIN__)
49 Index: b/numpy/numarray/_capi.c
50 ===================================================================
51 --- a/numpy/numarray/_capi.c
52 +++ b/numpy/numarray/_capi.c
53 @@ -10,7 +10,7 @@
54  #include <sys/param.h>
55  #endif
56  
57 -#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
58 +#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
59  #include <fenv.h>
60  #elif defined(__CYGWIN__)
61  #include "numpy/fenv/fenv.h"
62 @@ -258,7 +258,7 @@
63  }
64  
65  /* Likewise for Integer overflows */
66 -#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
67 +#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
68  static int int_overflow_error(Float64 value) { /* For x86_64 */
69      feraiseexcept(FE_OVERFLOW);
70      return (int) value;
71 @@ -3007,7 +3007,7 @@
72      return retstatus;
73  }
74  
75 -#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
76 +#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
77  
78  static int
79  NA_checkFPErrors(void)