From: Bruno Haible Date: Mon, 4 Jun 2007 22:58:09 +0000 (+0000) Subject: Avoid test failures on some PowerPC hardwares. X-Git-Tag: cvs-readonly~306 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=b16230b776af7cf76f75c483a7643786509b404f;p=gnulib.git Avoid test failures on some PowerPC hardwares. --- diff --git a/ChangeLog b/ChangeLog index c9fa72a4f..a159fc63e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-04 Bruno Haible + + 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 . + 2007-06-02 Bruno Haible Fix test-stdint failure on FreeBSD/ia64. diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c index 93cfa1443..f1446fe07 100644 --- a/tests/test-frexpl.c +++ b/tests/test-frexpl.c @@ -40,10 +40,14 @@ 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 diff --git a/tests/test-printf-frexpl.c b/tests/test-printf-frexpl.c index fe481eec8..2c1b1eb33 100644 --- a/tests/test-printf-frexpl.c +++ b/tests/test-printf-frexpl.c @@ -39,11 +39,16 @@ 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)