diff options
author | bde <bde@FreeBSD.org> | 2001-08-29 13:52:27 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2001-08-29 13:52:27 +0000 |
commit | 92c57599167493c3bef125d0aa3416a4f3abf082 (patch) | |
tree | 4587fdf85fbc795e0cbf9e3c4a511da739cd65a8 /lib/libc/gen | |
parent | 40c9b9ae1a590b90d8f9b5d53e9ca022f2a51b40 (diff) | |
download | FreeBSD-src-92c57599167493c3bef125d0aa3416a4f3abf082.zip FreeBSD-src-92c57599167493c3bef125d0aa3416a4f3abf082.tar.gz |
Fixed namespace pollution related to `warn' in libc (but not in other
libraries or for other members of the err() family).
This fixes world breakage in bc and rcs/* for NOSHARED worlds.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/err.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/initgroups.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 6d1766c..528fa86 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -37,7 +37,9 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* LIBC_RCS and not lint */ +#include "namespace.h" #include <err.h> +#include "un-namespace.h" #include <errno.h> #include <stdio.h> #include <stdlib.h> @@ -143,8 +145,10 @@ verrx(eval, fmt, ap) exit(eval); } +__weak_reference(_warn, warn); + void -warn(const char *fmt, ...) +_warn(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index b1ddd86..9918955 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -32,13 +32,20 @@ */ #if defined(LIBC_SCCS) && !defined(lint) +#if 0 static char sccsid[] = "@(#)initgroups.c 8.1 (Berkeley) 6/4/93"; +#else +static const char rcsid[] = + "$FreeBSD$"; +#endif #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <stdio.h> +#include "namespace.h" #include <err.h> +#include "un-namespace.h" #include <unistd.h> int @@ -53,7 +60,7 @@ initgroups(uname, agroup) warnx("%s is in too many groups, using first %d", uname, ngroups); if (setgroups(ngroups, groups) < 0) { - warn("setgroups"); + _warn("setgroups"); return (-1); } return (0); |