Loading...
net/FreeBSD/inet_addr.c.patch Libc-498.1.7 Libc-583
--- Libc/Libc-498.1.7/net/FreeBSD/inet_addr.c.patch
+++ Libc/Libc-583/net/FreeBSD/inet_addr.c.patch
@@ -1,37 +1,13 @@
---- inet_addr.c.orig	2003-05-20 15:22:14.000000000 -0700
-+++ inet_addr.c	2005-02-24 17:08:54.000000000 -0800
-@@ -61,6 +61,8 @@
+--- inet_addr.c.orig	2008-09-01 20:32:46.000000000 -0700
++++ inet_addr.c	2008-09-01 20:45:46.000000000 -0700
+@@ -68,6 +68,10 @@
+ static const char sccsid[] = "@(#)inet_addr.c	8.1 (Berkeley) 6/17/93";
+ static const char rcsid[] = "$Id: inet_addr.c,v 1.4.18.1 2005/04/27 05:00:52 sra Exp $";
+ #endif /* LIBC_SCCS and not lint */
++
++/* the algorithms only can deal with ASCII, so we optimize for it */
++#define USE_ASCII
++
  #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/lib/libc/net/inet_addr.c,v 1.16 2002/04/19 04:46:20 suz Exp $");
+ __FBSDID("$FreeBSD: src/lib/libc/inet/inet_addr.c,v 1.4 2007/06/03 17:20:26 ume Exp $");
  
-+#include "xlocale_private.h"
-+
- #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;
- 
- 		default:
--			if (isspace((unsigned char)*c)) {
-+			if (isspace_l((unsigned char)*c, loc)) {
- 				gotend = 1;
- 				break;
- 			} else