open-safer.c: avoid 'signed and unsigned in conditional...' warning
[gnulib.git] / tests / test-frexpl.c
index 08042be..f98bf51 100644 (file)
 # define MIN_NORMAL_EXP LDBL_MIN_EXP
 #endif
 
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+   So we use minus_zero instead.  */
+long double minus_zero = -LDBL_MIN * LDBL_MIN;
+
 static long double
 my_ldexp (long double x, int d)
 {
@@ -113,7 +117,7 @@ main ()
   { /* Negative zero.  */
     int exp = -9999;
     long double mantissa;
-    x = -0.0L;
+    x = minus_zero;
     mantissa = frexpl (x, &exp);
     ASSERT (exp == 0);
     ASSERT (mantissa == x);