aboutsummaryrefslogtreecommitdiff
path: root/fpu/softfloat-native.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpu/softfloat-native.h')
-rw-r--r--fpu/softfloat-native.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h
index 53bf68192f..5994cd4737 100644
--- a/fpu/softfloat-native.h
+++ b/fpu/softfloat-native.h
@@ -15,7 +15,9 @@
* Solaris 10 with GCC4 does not need these macros as they
* are defined in <iso/math_c99.h> with a compiler directive
*/
-#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) && (__GNUC__ <= 4)))
+#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \
+ && (__GNUC__ <= 4))) \
+ || defined(__OpenBSD__)
/*
* C99 7.12.3 classification macros
* and
@@ -24,6 +26,9 @@
* ... do not work on Solaris 10 using GNU CC 3.4.x.
* Try to workaround the missing / broken C99 math macros.
*/
+#if defined(__OpenBSD__)
+#define unordered(x, y) (isnan(x) || isnan(y))
+#endif
#define isnormal(x) (fpclass(x) >= FP_NZERO)
#define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y)))
@@ -84,6 +89,11 @@ typedef union {
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
+#if defined(__OpenBSD__)
+#define FE_RM FP_RM
+#define FE_RP FP_RP
+#define FE_RZ FP_RZ
+#endif
enum {
float_round_nearest_even = FP_RN,
float_round_down = FP_RM,