]>
Commit | Line | Data |
---|---|---|
3d9156a7 A |
1 | --- atof.c.orig 2004-11-25 11:38:41.000000000 -0800 |
2 | +++ atof.c 2005-02-23 18:31:38.000000000 -0800 | |
3 | @@ -37,11 +37,22 @@ | |
4 | #include <sys/cdefs.h> | |
5 | __FBSDID("$FreeBSD: src/lib/libc/stdlib/atof.c,v 1.5 2004/02/10 20:42:32 cperciva Exp $"); | |
6 | ||
7 | +#include "xlocale_private.h" | |
8 | + | |
9 | #include <stdlib.h> | |
10 | ||
11 | double | |
12 | atof(ascii) | |
13 | const char *ascii; | |
14 | { | |
15 | - return strtod(ascii, (char **)NULL); | |
16 | + return strtod_l(ascii, (char **)NULL, __current_locale()); | |
17 | +} | |
18 | + | |
19 | +double | |
20 | +atof_l(ascii, loc) | |
21 | + const char *ascii; | |
22 | + locale_t loc; | |
23 | +{ | |
24 | + /* no need to call NORMALIZE_LOCALE(loc) because strtod_l will */ | |
25 | + return strtod_l(ascii, (char **)NULL, loc); | |
26 | } |