File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,10 @@ typedef struct _loop1d_info {
223
223
/* This code checks the IEEE status flags in a platform-dependent way */
224
224
/* Adapted from Numarray */
225
225
226
+ #if (defined(__unix__ ) || defined(unix )) && !defined(USG )
227
+ #include <sys/param.h>
228
+ #endif
229
+
226
230
/* OSF/Alpha (Tru64) ---------------------------------------------*/
227
231
#if defined(__osf__ ) && defined(__alpha )
228
232
@@ -267,7 +271,7 @@ typedef struct _loop1d_info {
267
271
/* Solaris --------------------------------------------------------*/
268
272
/* --------ignoring SunOS ieee_flags approach, someone else can
269
273
** deal with that! */
270
- #elif defined(sun ) || defined(__BSD__ ) || defined(__OpenBSD__ ) || defined(__FreeBSD__ ) || defined(__NetBSD__ )
274
+ #elif defined(sun ) || defined(__BSD__ ) || defined(__OpenBSD__ ) || ( defined(__FreeBSD__ ) && ( __FreeBSD_version < 502114 ) ) || defined(__NetBSD__ )
271
275
#include <ieeefp.h>
272
276
273
277
#define UFUNC_CHECK_STATUS (ret ) { \
@@ -281,9 +285,9 @@ typedef struct _loop1d_info {
281
285
(void) fpsetsticky(0); \
282
286
}
283
287
284
- #elif defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ )
288
+ #elif defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ ) || (defined( __FreeBSD__ ) && ( __FreeBSD_version >= 502114 ))
285
289
286
- #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__MINGW32__ )
290
+ #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__MINGW32__ ) || defined( __FreeBSD__ )
287
291
#include <fenv.h>
288
292
#elif defined(__CYGWIN__ )
289
293
#include "fenv/fenv.c"
Original file line number Diff line number Diff line change 4
4
#include "numpy/libnumarray.h"
5
5
#include <float.h>
6
6
7
- #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__MINGW32__ )
7
+ #if (defined(__unix__ ) || defined(unix )) && !defined(USG )
8
+ #include <sys/param.h>
9
+ #endif
10
+
11
+ #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__MINGW32__ ) || (defined(__FreeBSD__ ) && (__FreeBSD_version >= 502114 ))
8
12
#include <fenv.h>
9
13
#elif defined(__CYGWIN__ )
10
14
#include "numpy/fenv/fenv.h"
@@ -231,7 +235,7 @@ static int int_dividebyzero_error(long value, long unused) {
231
235
}
232
236
233
237
/* Likewise for Integer overflows */
234
- #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ )
238
+ #if defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ ) || (defined( __FreeBSD__ ) && ( __FreeBSD_version >= 502114 ))
235
239
static int int_overflow_error (Float64 value ) { /* For x86_64 */
236
240
feraiseexcept (FE_OVERFLOW );
237
241
return (int ) value ;
@@ -2939,7 +2943,7 @@ NA_checkFPErrors(void)
2939
2943
return retstatus ;
2940
2944
}
2941
2945
2942
- #elif defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ )
2946
+ #elif defined(__GLIBC__ ) || defined(__APPLE__ ) || defined(__CYGWIN__ ) || defined(__MINGW32__ ) || (defined( __FreeBSD__ ) && ( __FreeBSD_version >= 502114 ))
2943
2947
2944
2948
static int
2945
2949
NA_checkFPErrors (void )
You can’t perform that action at this time.
0 commit comments