summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2001-11-11 02:48:09 +0000
committerbde <bde@FreeBSD.org>2001-11-11 02:48:09 +0000
commiteb58f0f1a85857ed4be993a454e8aafed1b43b58 (patch)
tree9f56244d965dec1345589fb1aa8b7b147549c0dd /lib/libc/net
parentfdac350c9d2806675dca447df23111492108d0b9 (diff)
downloadFreeBSD-src-eb58f0f1a85857ed4be993a454e8aafed1b43b58.zip
FreeBSD-src-eb58f0f1a85857ed4be993a454e8aafed1b43b58.tar.gz
Fixed namespace pollution related to `err' in libc in the same way as for
`warn'. Now a whole 2 members of the err() family don't cause pollution. This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c has had its own version of err() for a long time, but this somehow didn't cause problems until the update to awk-3.1.0.
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/nsdispatch.c4
-rw-r--r--lib/libc/net/nslexer.l3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c
index 311b89d..166db77 100644
--- a/lib/libc/net/nsdispatch.c
+++ b/lib/libc/net/nsdispatch.c
@@ -95,7 +95,7 @@ _nsdbtaddsrc(dbt, src)
dbt->srclist = (ns_src *)realloc(dbt->srclist,
(dbt->srclistsize + NSELEMSPERCHUNK) * sizeof(ns_src));
if (dbt->srclist == NULL)
- err(1, "nsdispatch: memory allocation failure");
+ _err(1, "nsdispatch: memory allocation failure");
}
memmove(&dbt->srclist[dbt->srclistsize++], src, sizeof(ns_src));
}
@@ -208,7 +208,7 @@ _nsdbtput(dbt)
_nsmap = (ns_dbt *)realloc(_nsmap,
(_nsmapsize + NSELEMSPERCHUNK) * sizeof(ns_dbt));
if (_nsmap == NULL)
- err(1, "nsdispatch: memory allocation failure");
+ _err(1, "nsdispatch: memory allocation failure");
}
memmove(&_nsmap[_nsmapsize++], dbt, sizeof(ns_dbt));
}
diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l
index 1166eed..5fa159e 100644
--- a/lib/libc/net/nslexer.l
+++ b/lib/libc/net/nslexer.l
@@ -84,7 +84,8 @@ STRING [a-zA-Z][a-zA-Z0-9_]*
int i;
if ((p = strdup(yytext)) == NULL)
- err(1, "nsdispatch: memory allocation failure");
+ _err(1,
+ "nsdispatch: memory allocation failure");
for (i = 0; i < strlen(p); i++) {
if (isupper((unsigned char)p[i]))
OpenPOWER on IntegriCloud