Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/include Avoid defining macros from the <fenv....



details:   https://anonhg.NetBSD.org/src/rev/ab3b77da8d94
branches:  trunk
changeset: 335340:ab3b77da8d94
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jan 03 18:12:12 2015 +0000

description:
Avoid defining macros from the <fenv.h> namespace here (especially with
different values).

diffstat:

 sys/arch/sparc/include/ieeefp.h |  28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)

diffs (51 lines):

diff -r df366205274c -r ab3b77da8d94 sys/arch/sparc/include/ieeefp.h
--- a/sys/arch/sparc/include/ieeefp.h   Sat Jan 03 17:24:20 2015 +0000
+++ b/sys/arch/sparc/include/ieeefp.h   Sat Jan 03 18:12:12 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ieeefp.h,v 1.8 2012/03/20 23:57:57 christos Exp $      */
+/*     $NetBSD: ieeefp.h,v 1.9 2015/01/03 18:12:12 martin Exp $        */
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -12,14 +12,6 @@
 
 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
 
-#define        FE_INEXACT      0x01    /* imprecise (loss of precision) */
-#define        FE_DIVBYZERO    0x02    /* divide-by-zero exception */
-#define        FE_UNDERFLOW    0x04    /* overflow exception */
-#define        FE_OVERFLOW     0x08    /* underflow exception */
-#define        FE_INVALID      0x10    /* invalid operation exception */
-
-#define        FE_ALL_EXCEPT   0x1f
-
 #define        FE_TONEAREST    0       /* round to nearest representable number */
 #define        FE_TOWARDZERO   1       /* round to zero (truncate) */
 #define        FE_UPWARD       2       /* round toward positive infinity */
@@ -28,17 +20,17 @@
 #if !defined(_ISOC99_SOURCE)
 
 typedef unsigned int fp_except;
-#define FP_X_IMP       FE_INEXACT      /* imprecise (loss of precision) */
-#define FP_X_DZ                FE_DIVBYZERO    /* divide-by-zero exception */
-#define FP_X_UFL       FE_UNDERFLOW    /* underflow exception */
-#define FP_X_OFL       FE_OVERFLOW     /* overflow exception */
-#define FP_X_INV       FE_INVALID      /* invalid operation exception */
+#define FP_X_IMP       0x01            /* imprecise (loss of precision) */
+#define FP_X_DZ                0x02            /* divide-by-zero exception */
+#define FP_X_UFL       0x04            /* underflow exception */
+#define FP_X_OFL       0x08            /* overflow exception */
+#define FP_X_INV       0x10            /* invalid operation exception */
 
 typedef enum {
-    FP_RN=FE_TONEAREST,                /* round to nearest representable number */
-    FP_RZ=FE_TOWARDZERO,       /* round to zero (truncate) */
-    FP_RP=FE_UPWARD,           /* round toward positive infinity */
-    FP_RM=FE_DOWNWARD          /* round toward negative infinity */
+    FP_RN=0,                   /* round to nearest representable number */
+    FP_RZ=1,                   /* round to zero (truncate) */
+    FP_RP=2,                   /* round toward positive infinity */
+    FP_RM=3                    /* round toward negative infinity */
 } fp_rnd;
 
 #endif /* !_ISOC99_SOURCE */



Home | Main Index | Thread Index | Old Index