1 --- gdtoa-strtopx.c.orig 2008-10-28 12:54:18.000000000 -0700
2 +++ gdtoa-strtopx.c 2008-10-28 12:57:26.000000000 -0700
3 @@ -29,6 +29,8 @@ 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"
12 @@ -53,9 +55,9 @@ THIS SOFTWARE.
16 -strtopx(s, sp, V) CONST char *s; char **sp; void *V;
17 +strtopx(s, sp, V, loc) CONST char *s; char **sp; void *V; locale_t loc;
19 -strtopx(CONST char *s, char **sp, void *V)
20 +strtopx(CONST char *s, char **sp, void *V, locale_t loc)
23 static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
24 @@ -69,9 +71,12 @@ strtopx(CONST char *s, char **sp, void *
28 - k = strtodg(s, sp, fpi, &exp, bits);
29 + k = strtodg(s, sp, fpi, &exp, bits, loc);
30 switch(k & STRTOG_Retmask) {
32 + L[0] = L[1] = L[2] = L[3] = L[4] = 0;
33 + return k; // avoid setting sign
36 L[0] = L[1] = L[2] = L[3] = L[4] = 0;
38 @@ -92,7 +97,8 @@ strtopx(CONST char *s, char **sp, void *
42 - L[_1] = L[_2] = L[_3] = L[_4] = 0;
43 + L[_1] = 0x8000; /* 4306392: to match gcc */
44 + L[_2] = L[_3] = L[_4] = 0;