Avoid test failures on some PowerPC hardwares.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Jun 2007 22:58:09 +0000 (22:58 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Jun 2007 22:58:09 +0000 (22:58 +0000)
ChangeLog
tests/test-frexpl.c
tests/test-printf-frexpl.c

index c9fa72a4fe4c46127d4e7df3cd653a4021da0ee5..a159fc63ec9e710e7513ff70de469ee332d9424b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-04  Bruno Haible  <bruno@clisp.org>
+
+       Avoid test failures on some PowerPC platforms.
+       * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
+       Define differently for PowerPC.
+       * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
+       Reported by Gary V. Vaughan <gary@gnu.org>.
+
 2007-06-02  Bruno Haible  <bruno@clisp.org>
 
        Fix test-stdint failure on FreeBSD/ia64.
index 93cfa14434f37ae2c0b386ec908c13e896d57ebb..f1446fe07d4663a6110847474372f3dcb1c42611 100644 (file)
   while (0)
 
 /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
-   exponent for 'long double' is -964.  For exponents below that, the
-   precision may be truncated to the precision used for 'double'.  */
+   exponent for 'long double' is -964.  Similarly, on PowerPC machines,
+   LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+   is -968.  For exponents below that, the precision may be truncated to the
+   precision used for 'double'.  */
 #ifdef __sgi
 # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
 #else
 # define MIN_NORMAL_EXP LDBL_MIN_EXP
 #endif
index fe481eec850604bc91b7e16df7421d73bdaaaa2d..2c1b1eb33d501c211963678ece76e237bb263ea6 100644 (file)
   while (0)
 
 /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
-   exponent for 'long double' is -964.  For exponents below that, the
-   precision may be truncated to the precision used for 'double'.  */
+   exponent for 'long double' is -964.  Similarly, on PowerPC machines,
+   LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+   is -968.  For exponents below that, the precision may be truncated to the
+   precision used for 'double'.  */
 #ifdef __sgi
 # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
 # define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+# define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
 #else
 # define MIN_NORMAL_EXP LDBL_MIN_EXP
 # define MIN_SUBNORMAL_EXP (LDBL_MIN_EXP - 100)