Summary: | wcstold functions are incorrect for 128bit long double | ||
---|---|---|---|
Product: | glibc | Reporter: | H.J. Lu <hjl.tools> |
Component: | libc | Assignee: | GOTO Masanori <gotom> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Flags: | fweimer:
security-
|
Priority: | P2 | ||
Version: | 2.3.3 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | A patch to fix 128bit wcstold/wcstold_l |
Description
H.J. Lu
2004-03-09 22:11:37 UTC
Created attachment 30 [details]
A patch to fix 128bit wcstold/wcstold_l
There is only one wcstold.c under wcsmbs, which is used on all
platforms. It has
# define SET_MANTISSA(flt, mant) \
do { union ieee854_long_double u; \
u.d = (flt); \
if ((mant & 0x7fffffffffffffffULL) == 0) \
mant = 0x4000000000000000ULL; \
u.ieee.mantissa0 = (((mant) >> 32) & 0x7fffffff) | 0x80000000; \
u.ieee.mantissa1 = (mant) & 0xffffffff; \
(flt) = u.d; \
} while (0)
But it is for 96bit IEEE long double and won't work for 128bit IEEE
long double. This patch just includes <strtold.c> or <strtold_l.c>,
which support different long doubles.
Should be handled correctly in CVS. Not with the attached patch, though, but with a completely different solution. |