X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..a9aaacca3a68bb8d74fec09d8d8681a0efda2581:/stdlib/FreeBSD/atol.c diff --git a/stdlib/FreeBSD/atol.c b/stdlib/FreeBSD/atol.c index 2209340..5e52d95 100644 --- a/stdlib/FreeBSD/atol.c +++ b/stdlib/FreeBSD/atol.c @@ -33,11 +33,22 @@ static char sccsid[] = "@(#)atol.c 8.1 (Berkeley) 6/4/93"; #include __FBSDID("$FreeBSD: src/lib/libc/stdlib/atol.c,v 1.5 2007/01/09 00:28:09 imp Exp $"); +#include "xlocale_private.h" + #include long atol(str) const char *str; { - return strtol(str, (char **)NULL, 10); + return strtol_l(str, (char **)NULL, 10, __current_locale()); +} + +long +atol_l(str, loc) + const char *str; + locale_t loc; +{ + /* no need to call NORMALIZE_LOCALE(loc) because strtol_l will */ + return strtol_l(str, (char **)NULL, 10, loc); }