autoupdate
[gnulib.git] / tests / test-round1.c
index 2710f91..0f2ed94 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "isnand.h"
+#include "isnand-nolibm.h"
 #include "nan.h"
 
 #define ASSERT(expr) \
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
   while (0)
 
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+   So we use -zero instead.  */
+double zero = 0.0;
+
 int
 main ()
 {
   /* Zero.  */
   ASSERT (round (0.0) == 0.0);
-  ASSERT (round (-0.0) == 0.0);
+  ASSERT (round (-zero) == 0.0);
   /* Positive numbers.  */
   ASSERT (round (0.3) == 0.0);
   ASSERT (round (0.5) == 1.0);