Loading...
--- Libc/Libc-1669.0.4/stdlib/FreeBSD/strtol.c
+++ Libc/Libc-763.13/stdlib/FreeBSD/strtol.c
@@ -33,8 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdlib/strtol.c,v 1.20 2007/01/09 00:28:10 imp Exp $");
-#include "xlocale_private.h"
-
#include <limits.h>
#include <ctype.h>
#include <errno.h>
@@ -48,8 +46,7 @@
* alphabets and digits are each contiguous.
*/
long
-strtol_l(const char * __restrict nptr, char ** __restrict endptr, int base,
- locale_t loc)
+strtol(const char * __restrict nptr, char ** __restrict endptr, int base)
{
const char *s;
unsigned long acc;
@@ -57,7 +54,6 @@
unsigned long cutoff;
int neg, any, cutlim;
- NORMALIZE_LOCALE(loc);
/*
* Skip white space and pick up leading +/- sign if any.
* If base is 0, allow 0x for hex and 0 for octal, else
@@ -66,7 +62,7 @@
s = nptr;
do {
c = *s++;
- } while (isspace_l((unsigned char)c, loc));
+ } while (isspace((unsigned char)c));
if (c == '-') {
neg = 1;
c = *s++;
@@ -142,9 +138,3 @@
*endptr = (char *)(any ? s - 1 : nptr);
return (acc);
}
-
-long
-strtol(const char * __restrict nptr, char ** __restrict endptr, int base)
-{
- return strtol_l(nptr, endptr, base, __current_locale());
-}