|
|
/* This code checks the IEEE status flags in a platform-dependent way */ | /* This code checks the IEEE status flags in a platform-dependent way */ |
/* Adapted from Numarray */ | /* Adapted from Numarray */ |
| |
|
#if (defined(__unix__) || defined(unix)) && !defined(USG) |
|
#include <sys/param.h> |
|
#endif |
|
|
/* OSF/Alpha (Tru64) ---------------------------------------------*/ | /* OSF/Alpha (Tru64) ---------------------------------------------*/ |
#if defined(__osf__) && defined(__alpha) | #if defined(__osf__) && defined(__alpha) |
| |
|
|
/* Solaris --------------------------------------------------------*/ | /* Solaris --------------------------------------------------------*/ |
/* --------ignoring SunOS ieee_flags approach, someone else can | /* --------ignoring SunOS ieee_flags approach, someone else can |
** deal with that! */ | ** 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> | #include <ieeefp.h> |
| |
#define UFUNC_CHECK_STATUS(ret) { \ | #define UFUNC_CHECK_STATUS(ret) { \ |
|
|
(void) fpsetsticky(0); \ | (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> | #include <fenv.h> |
#elif defined(__CYGWIN__) | #elif defined(__CYGWIN__) |
#include "fenv/fenv.c" | #include "fenv/fenv.c" |