X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..aa54d2fad3d9038b43475aa93c76795c5141a993:/stdlib/FreeBSD/atof.c?ds=sidebyside diff --git a/stdlib/FreeBSD/atof.c b/stdlib/FreeBSD/atof.c index 8ece097..fff3e7d 100644 --- a/stdlib/FreeBSD/atof.c +++ b/stdlib/FreeBSD/atof.c @@ -33,11 +33,22 @@ static char sccsid[] = "@(#)atof.c 8.1 (Berkeley) 6/4/93"; #include __FBSDID("$FreeBSD: src/lib/libc/stdlib/atof.c,v 1.6 2007/01/09 00:28:09 imp Exp $"); +#include "xlocale_private.h" + #include double atof(ascii) const char *ascii; { - return strtod(ascii, (char **)NULL); + return strtod_l(ascii, (char **)NULL, __current_locale()); +} + +double +atof_l(ascii, loc) + const char *ascii; + locale_t loc; +{ + /* no need to call NORMALIZE_LOCALE(loc) because strtod_l will */ + return strtod_l(ascii, (char **)NULL, loc); }