]> git.saurik.com Git - apple/libc.git/blob - gdtoa/FreeBSD/gdtoa-strtopx.c.patch
d251fb471b4ffaf943af012dac953f52d25698a8
[apple/libc.git] / gdtoa / FreeBSD / gdtoa-strtopx.c.patch
1 --- gdtoa-strtopx.c.orig 2010-01-12 10:59:42.000000000 -0800
2 +++ gdtoa-strtopx.c 2010-01-12 12:11:48.000000000 -0800
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 "."). */
6
7 +#include "xlocale_private.h"
8 +
9 #include "gdtoaimp.h"
10
11 #undef _0
12 @@ -53,9 +55,9 @@ THIS SOFTWARE.
13
14 int
15 #ifdef KR_headers
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;
18 #else
19 -strtopx(CONST char *s, char **sp, void *V)
20 +strtopx(CONST char *s, char **sp, void *V, locale_t loc)
21 #endif
22 {
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 *
25 #define fpi &fpi0
26 #endif
27
28 - k = strtodg(s, sp, fpi, &exp, bits);
29 + k = strtodg(s, sp, fpi, &exp, bits, loc);
30 switch(k & STRTOG_Retmask) {
31 case STRTOG_NoNumber:
32 + L[0] = L[1] = L[2] = L[3] = L[4] = 0;
33 + return k; // avoid setting sign
34 +
35 case STRTOG_Zero:
36 L[0] = L[1] = L[2] = L[3] = L[4] = 0;
37 break;