diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2007-12-14 13:39:15 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2007-12-14 13:39:15 +0000 |
commit | d3c469c90bfe792ca0cfe283bcbf0e8fd24dab96 (patch) | |
tree | 08e60ee191ff0d063eaa7773f42521e10cfff535 /numpy/numarray | |
parent | dd955bdb391b4dfe8922ce5a563173399df963a9 (diff) | |
download | numpy-d3c469c90bfe792ca0cfe283bcbf0e8fd24dab96.tar.gz |
Fix building on freebsd [patch by Joe Peterson].
Diffstat (limited to 'numpy/numarray')
-rw-r--r-- | numpy/numarray/_capi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c index 0ba1be221..07fcc0c2d 100644 --- a/numpy/numarray/_capi.c +++ b/numpy/numarray/_capi.c @@ -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 @@ static int int_dividebyzero_error(long value, long unused) { } /* 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 @@ NA_checkFPErrors(void) 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) |