]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make math.h FP_* macros usable in #if (bug 3439).
authorJoseph Myers <joseph@codesourcery.com>
Fri, 2 Nov 2012 22:11:21 +0000 (22:11 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 2 Nov 2012 22:11:21 +0000 (22:11 +0000)
ChangeLog
math/math.h

index 798a816ebadd359c94679d43b6185b4a6b198574..c84a492cf0676de6e8783b0b18b7ed771ad01cfa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-11-02  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #3439]
+       * math/math.h (FP_NAN): Define macro to integer constant usable in
+       #if and use that to give value to enum constant.
+       (FP_INFINITE): Likewise.
+       (FP_ZERO): Likewise.
+       (FP_SUBNORMAL): Likewise.
+       (FP_NORMAL): Likewise.
+
 2012-11-02  Andreas Schwab  <schwab@linux-m68k.org>
 
        * iconvdata/bug-iconv8.c (do_test): Use %z for size_t arguments.
index bcdd5c9c74eef6391549ad6f75dea055b695e9ca..0b4bc0ce6d69c6584855ed46b2d0c83b24126dfd 100644 (file)
@@ -189,16 +189,21 @@ extern int signgam;
 /* All floating-point numbers can be put in one of these categories.  */
 enum
   {
-    FP_NAN,
-# define FP_NAN FP_NAN
-    FP_INFINITE,
-# define FP_INFINITE FP_INFINITE
-    FP_ZERO,
-# define FP_ZERO FP_ZERO
-    FP_SUBNORMAL,
-# define FP_SUBNORMAL FP_SUBNORMAL
-    FP_NORMAL
-# define FP_NORMAL FP_NORMAL
+    FP_NAN =
+# define FP_NAN 0
+      FP_NAN,
+    FP_INFINITE =
+# define FP_INFINITE 1
+      FP_INFINITE,
+    FP_ZERO =
+# define FP_ZERO 2
+      FP_ZERO,
+    FP_SUBNORMAL =
+# define FP_SUBNORMAL 3
+      FP_SUBNORMAL,
+    FP_NORMAL =
+# define FP_NORMAL 4
+      FP_NORMAL
   };
 
 /* Return number of classification appropriate for X.  */