[hjl@gnu libc]$ find -name wcstold.c ./wcsmbs/wcstold.c [hjl@gnu libc]$ find -name strtold.c ./sysdeps/generic/strtold.c ./sysdeps/ieee754/ldbl-128/strtold.c ./sysdeps/ieee754/ldbl-96/strtold.c ./sysdeps/m68k/strtold.c We are using 96 bit double for 128bit long double in wcstold functions. wcstold should be treated similar as strtold.
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.