diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-06-12 03:16:21 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-06-12 03:16:21 +0000 |
commit | ec1ec41f703fd79fe5c2cfc5a5b1aaa82d82095a (patch) | |
tree | b00046446f32f05315208d9de3738bfb37ad2587 /lib/libc/gen/errx.c | |
parent | becbcf04df2ca2e46f369832d8107762301ddaac (diff) |
__indr_reference() and the definition in the same compilation unit are
a bad idea. use __weak_alias(), but for now put the definition at the
bottom, since AUX_FUNC is not properly propagated to the weak definition,
and will cause grief to the linker. should fix vax.
tested by hin@ via LDSTATIC=-static, millert@ ok.
Diffstat (limited to 'lib/libc/gen/errx.c')
-rw-r--r-- | lib/libc/gen/errx.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/gen/errx.c b/lib/libc/gen/errx.c index f307e243b0e..e787895420d 100644 --- a/lib/libc/gen/errx.c +++ b/lib/libc/gen/errx.c @@ -32,19 +32,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: errx.c,v 1.5 2002/06/08 04:52:55 fgsch Exp $"; +static char rcsid[] = "$OpenBSD: errx.c,v 1.6 2002/06/12 03:16:20 fgsch Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> #include <err.h> #include <stdarg.h> -#ifdef __indr_reference -__indr_reference(_errx, errx); -#else -__weak_alias(errx, _errx); -#endif - __dead void _errx(int eval, const char *fmt, ...) { @@ -54,3 +48,6 @@ _errx(int eval, const char *fmt, ...) _verrx(eval, fmt, ap); va_end(ap); } + +__weak_alias(errx, _errx); + |