- #include <sys/param.h>
-
- #include <netinet/in.h>
-@@ -103,6 +105,7 @@
- char *c;
- char *endptr;
- int gotend, n;
-+ locale_t loc = __current_locale();
-
- c = (char *)cp;
- n = 0;
-@@ -113,7 +116,7 @@
- gotend = 0;
- while (!gotend) {
- errno = 0;
-- val = strtoul(c, &endptr, 0);
-+ val = strtoul_l(c, &endptr, 0, loc);
-
- if (errno == ERANGE) /* Fail completely if it overflowed. */
- return (0);
-@@ -144,7 +147,7 @@
- break;
++/* the algorithms only can deal with ASCII, so we optimize for it */
++#define USE_ASCII
++
+ #include <sys/cdefs.h>
+ __FBSDID("$FreeBSD: src/lib/libc/inet/inet_addr.c,v 1.4 2007/06/03 17:20:26 ume Exp $");