1 --- gdtoa-strtof.c.orig 2008-10-28 12:35:19.000000000 -0700
2 +++ gdtoa-strtof.c 2008-10-28 13:19:34.000000000 -0700
3 @@ -29,13 +29,15 @@ THIS SOFTWARE.
4 /* Please send bug reports to David M. Gay (dmg at acm dot org,
5 * with " at " changed at "@" and " dot " changed to "."). */
7 +#include "xlocale_private.h"
13 -strtof(s, sp) CONST char *s; char **sp;
14 +strtof_l(s, sp, loc) CONST char *s; char **sp; locale_t loc;
16 -strtof(CONST char *s, char **sp)
17 +strtof_l(CONST char *s, char **sp, locale_t loc)
20 static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
21 @@ -49,9 +51,13 @@ strtof(CONST char *s, char **sp)
25 - k = strtodg(s, sp, fpi, &exp, bits);
26 + NORMALIZE_LOCALE(loc);
27 + k = strtodg(s, sp, fpi, &exp, bits, loc);
28 switch(k & STRTOG_Retmask) {
31 + return u.f; // avoid setting sign
36 @@ -76,3 +82,13 @@ strtof(CONST char *s, char **sp)
37 u.L[0] |= 0x80000000L;
43 +strtof(s, sp) CONST char *s; char **sp;
45 +strtof(CONST char *s, char **sp)
48 + return strtof_l(s, sp, __current_locale());