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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -Nur numpy-1.0.4.old/numpy/core/include/numpy/ufuncobject.h numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h
--- numpy-1.0.4.old/numpy/core/include/numpy/ufuncobject.h 2007-11-07 15:05:15 -0700
+++ numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h 2007-11-20 18:10:46 -0700
@@ -223,6 +223,10 @@
/* This code checks the IEEE status flags in a platform-dependent way */
/* Adapted from Numarray */
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
+
/* OSF/Alpha (Tru64) ---------------------------------------------*/
#if defined(__osf__) && defined(__alpha)
@@ -267,7 +271,7 @@
/* Solaris --------------------------------------------------------*/
/* --------ignoring SunOS ieee_flags approach, someone else can
** deal with that! */
-#elif defined(sun) || defined(__BSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(sun) || defined(__BSD__) || defined(__OpenBSD__) || (defined(__FreeBSD__) && (__FreeBSD_version < 502114)) || defined(__NetBSD__)
#include <ieeefp.h>
#define UFUNC_CHECK_STATUS(ret) { \
@@ -281,9 +285,9 @@
(void) fpsetsticky(0); \
}
-#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)
+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
+#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || defined(__FreeBSD__)
#include <fenv.h>
#elif defined(__CYGWIN__)
#include "fenv/fenv.c"
diff -Nur numpy-1.0.4.old/numpy/numarray/_capi.c numpy-1.0.4/numpy/numarray/_capi.c
--- numpy-1.0.4.old/numpy/numarray/_capi.c 2007-11-07 15:05:16 -0700
+++ numpy-1.0.4/numpy/numarray/_capi.c 2007-11-20 18:05:20 -0700
@@ -4,7 +4,11 @@
#include "numpy/libnumarray.h"
#include <float.h>
-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
+
+#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
#include <fenv.h>
#elif defined(__CYGWIN__)
#include "numpy/fenv/fenv.h"
@@ -231,7 +235,7 @@
}
/* Likewise for Integer overflows */
-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
static int int_overflow_error(Float64 value) { /* For x86_64 */
feraiseexcept(FE_OVERFLOW);
return (int) value;
@@ -2939,7 +2943,7 @@
return retstatus;
}
-#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)
+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
static int
NA_checkFPErrors(void)
|