]> git.saurik.com Git - apple/libc.git/blame - gdtoa/FreeBSD/gdtoa-gethex.c.patch
Libc-391.2.3.tar.gz
[apple/libc.git] / gdtoa / FreeBSD / gdtoa-gethex.c.patch
CommitLineData
3d9156a7
A
1--- gdtoa-gethex.c.orig 2005-02-17 01:16:50.000000000 -0800
2+++ gdtoa-gethex.c 2005-02-17 01:27:10.000000000 -0800
3@@ -29,6 +29,8 @@
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 #ifdef USE_LOCALE
12@@ -37,10 +39,10 @@
13
14 int
15 #ifdef KR_headers
16-gethex(sp, fpi, exp, bp, sign)
17- CONST char **sp; FPI *fpi; Long *exp; Bigint **bp; int sign;
18+gethex(sp, fpi, exp, bp, sign, loc)
19+ CONST char **sp; FPI *fpi; Long *exp; Bigint **bp; int sign; locale_t loc;
20 #else
21-gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
22+gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign, locale_t loc)
23 #endif
24 {
25 Bigint *b;
26@@ -49,7 +51,10 @@
27 ULong L, lostbits, *x;
28 Long e, e1;
29 #ifdef USE_LOCALE
30- unsigned char decimalpoint = *localeconv()->decimal_point;
31+ unsigned char decimalpoint;
32+
33+ NORMALIZE_LOCALE(loc);
34+ decimalpoint = *localeconv_l(loc)->decimal_point;
35 #else
36 #define decimalpoint '.'
37 #endif