1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
2004-03-24  Jakub Jelinek  <jakub@redhat.com>

	* 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.
This commit is contained in:
Ulrich Drepper
2004-03-24 22:05:34 +00:00
parent 6abbc50157
commit 9ce0ecbe38
7 changed files with 34 additions and 15 deletions

View File

@@ -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);