From 9ce0ecbe384f09030cd5d014e17179725e778fa6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Mar 2004 22:05:34 +0000 Subject: Update. 2004-03-24 Jakub Jelinek * stdlib/strtod_l.c (INTERNAL (__STRTOF)): Clear the rest of retval, not just one limb if RETURN_LIMB_SIZE > 2. Fix shifting up if RETURN_LIMB_SIZE > 2. * stdio-common/printf_fp.c (__printf_fp): For IEEE quad long double on 32-bit architectures reserve 8 limbs instead of 4. --- stdio-common/printf_fp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'stdio-common') diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index 62867e75f2..ed225e05a6 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -430,7 +430,9 @@ __printf_fp (FILE *fp, would be really big it could lead to memory problems. */ { mp_size_t bignum_size = ((ABS (exponent) + BITS_PER_MP_LIMB - 1) - / BITS_PER_MP_LIMB + 4) * sizeof (mp_limb_t); + / BITS_PER_MP_LIMB + + (LDBL_MANT_DIG / BITS_PER_MP_LIMB > 2 ? 8 : 4)) + * sizeof (mp_limb_t); frac = (mp_limb_t *) alloca (bignum_size); tmp = (mp_limb_t *) alloca (bignum_size); scale = (mp_limb_t *) alloca (bignum_size); -- cgit v1.2.3