about summary refs log tree commit diff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-03 17:07:56 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-03 17:07:56 +0000
commitfbeafedeea37e0af1984a6511018d159f5ceed6a (patch)
tree3bca3c62f6c2004bf50708d4ced2500971a342b7 /sysdeps/sparc
parent0244426b930b006b128ea0c874b1301e9528ad5f (diff)
downloadglibc-fbeafedeea37e0af1984a6511018d159f5ceed6a.tar.gz
glibc-fbeafedeea37e0af1984a6511018d159f5ceed6a.tar.xz
glibc-fbeafedeea37e0af1984a6511018d159f5ceed6a.zip
Make fenv.h FE_* macros usable in #if (bug 3439).
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/fpu/bits/fenv.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/sysdeps/sparc/fpu/bits/fenv.h b/sysdeps/sparc/fpu/bits/fenv.h
index 0e2a9b9e63..afe66ce5a0 100644
--- a/sysdeps/sparc/fpu/bits/fenv.h
+++ b/sysdeps/sparc/fpu/bits/fenv.h
@@ -26,16 +26,21 @@
    of the appropriate accrued exception bits from the FSR.  */
 enum
   {
-    FE_INVALID = 	(1 << 9),
-#define FE_INVALID	FE_INVALID
-    FE_OVERFLOW = 	(1 << 8),
-#define FE_OVERFLOW	FE_OVERFLOW
-    FE_UNDERFLOW = 	(1 << 7),
-#define FE_UNDERFLOW	FE_UNDERFLOW
-    FE_DIVBYZERO = 	(1 << 6),
-#define FE_DIVBYZERO	FE_DIVBYZERO
-    FE_INEXACT = 	(1 << 5)
-#define FE_INEXACT	FE_INEXACT
+    FE_INVALID =
+#define FE_INVALID	(1 << 9)
+      FE_INVALID,
+    FE_OVERFLOW =
+#define FE_OVERFLOW	(1 << 8)
+      FE_OVERFLOW,
+    FE_UNDERFLOW =
+#define FE_UNDERFLOW	(1 << 7)
+      FE_UNDERFLOW,
+    FE_DIVBYZERO =
+#define FE_DIVBYZERO	(1 << 6)
+      FE_DIVBYZERO,
+    FE_INEXACT =
+#define FE_INEXACT	(1 << 5)
+      FE_INEXACT
   };
 
 #define FE_ALL_EXCEPT \
@@ -46,14 +51,18 @@ enum
    for the appropriate macros.  */
 enum
   {
-    FE_TONEAREST = 	(0U << 30),
-#define FE_TONEAREST	FE_TONEAREST
-    FE_TOWARDZERO = 	(1U << 30),
-#define FE_TOWARDZERO	FE_TOWARDZERO
-    FE_UPWARD = 	(2U << 30),
-#define FE_UPWARD	FE_UPWARD
-    FE_DOWNWARD = 	(3U << 30)
-#define FE_DOWNWARD	FE_DOWNWARD
+    FE_TONEAREST =
+#define FE_TONEAREST	(0 << 30)
+      FE_TONEAREST,
+    FE_TOWARDZERO =
+#define FE_TOWARDZERO	(1 << 30)
+      FE_TOWARDZERO,
+    FE_UPWARD =
+#define FE_UPWARD	(-0x7fffffff - 1) /* (2 << 30) */
+      FE_UPWARD,
+    FE_DOWNWARD =
+#define FE_DOWNWARD	(-0x40000000) /* (3 << 30) */
+      FE_DOWNWARD
   };
 
 #define __FE_ROUND_MASK	(3U << 30)