diff options
Diffstat (limited to 'lib/libc/stdlib/atoi.c')
-rw-r--r-- | lib/libc/stdlib/atoi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/stdlib/atoi.c b/lib/libc/stdlib/atoi.c index 0ffcd03..31a8676 100644 --- a/lib/libc/stdlib/atoi.c +++ b/lib/libc/stdlib/atoi.c @@ -2,6 +2,11 @@ * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,6 +39,7 @@ static char sccsid[] = "@(#)atoi.c 8.1 (Berkeley) 6/4/93"; __FBSDID("$FreeBSD$"); #include <stdlib.h> +#include <xlocale.h> int atoi(str) @@ -41,3 +47,11 @@ atoi(str) { return (int)strtol(str, (char **)NULL, 10); } + +int +atoi_l(str, locale) + const char *str; + locale_t locale; +{ + return (int)strtol_l(str, (char **)NULL, 10, locale); +} |