1 --- nsap_addr.c.orig 2003-05-20 15:22:14.000000000 -0700
2 +++ nsap_addr.c 2005-02-24 16:48:08.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/net/nsap_addr.c,v 1.9 2002/03/22 21:52:29 obrien Exp $");
7 +#include "xlocale_private.h"
10 #include <sys/param.h>
11 #include <sys/socket.h>
13 #include <arpa/nameser.h>
24 + locale_t loc = __current_locale();
26 while ((c = *ascii++) != '\0' && len < (u_int)maxlen) {
27 if (c == '.' || c == '+' || c == '/')
34 + if (islower_l(c, loc))
35 + c = toupper_l(c, loc);
36 + if (isxdigit_l(c, loc)) {
42 + c = toupper_l(c, loc);
43 + if (isxdigit_l(c, loc)) {
44 *binary++ = (nib << 4) | xtob(c);
51 - static char tmpbuf[255*3];
52 + static char *tmpbuf = NULL;
55 + if (tmpbuf == NULL) {
56 + tmpbuf = malloc(255*3);