summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-12 03:16:21 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-12 03:16:21 +0000
commitec1ec41f703fd79fe5c2cfc5a5b1aaa82d82095a (patch)
treeb00046446f32f05315208d9de3738bfb37ad2587 /lib
parentbecbcf04df2ca2e46f369832d8107762301ddaac (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')
-rw-r--r--lib/libc/gen/err.c11
-rw-r--r--lib/libc/gen/errx.c11
-rw-r--r--lib/libc/gen/verr.c11
-rw-r--r--lib/libc/gen/verrx.c11
-rw-r--r--lib/libc/gen/vwarn.c11
-rw-r--r--lib/libc/gen/vwarnx.c11
-rw-r--r--lib/libc/gen/warn.c11
-rw-r--r--lib/libc/gen/warnx.c11
8 files changed, 32 insertions, 56 deletions
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c
index 2a25c0a08ca..6094f12a45d 100644
--- a/lib/libc/gen/err.c
+++ b/lib/libc/gen/err.c
@@ -32,19 +32,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: err.c,v 1.6 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.7 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(_err, err);
-#else
-__weak_alias(err, _err);
-#endif
-
__dead void
_err(int eval, const char *fmt, ...)
{
@@ -54,3 +48,6 @@ _err(int eval, const char *fmt, ...)
_verr(eval, fmt, ap);
va_end(ap);
}
+
+__weak_alias(err, _err);
+
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);
+
diff --git a/lib/libc/gen/verr.c b/lib/libc/gen/verr.c
index aecfc012bbd..c2a7c17dff6 100644
--- a/lib/libc/gen/verr.c
+++ b/lib/libc/gen/verr.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verr.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: verr.c,v 1.5 2002/06/12 03:16:20 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -43,12 +43,6 @@ static char rcsid[] = "$OpenBSD: verr.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#include <string.h>
#include <stdarg.h>
-#ifdef __indr_reference
-__indr_reference(_verr, verr);
-#else
-__weak_alias(verr, _verr);
-#endif
-
extern char *__progname; /* Program name, from crt0. */
__dead void
@@ -68,3 +62,6 @@ _verr(eval, fmt, ap)
(void)fprintf(stderr, "%s\n", strerror(sverrno));
exit(eval);
}
+
+__weak_alias(verr, _verr);
+
diff --git a/lib/libc/gen/verrx.c b/lib/libc/gen/verrx.c
index 8ce7ee48d7e..40f6ca9bf51 100644
--- a/lib/libc/gen/verrx.c
+++ b/lib/libc/gen/verrx.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verrx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: verrx.c,v 1.5 2002/06/12 03:16:20 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -41,12 +41,6 @@ static char rcsid[] = "$OpenBSD: verrx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#include <stdlib.h>
#include <stdarg.h>
-#ifdef __indr_reference
-__indr_reference(_verrx, verrx);
-#else
-__weak_alias(verrx, _verrx);
-#endif
-
extern char *__progname; /* Program name, from crt0. */
__dead void
@@ -61,3 +55,6 @@ _verrx(eval, fmt, ap)
(void)fprintf(stderr, "\n");
exit(eval);
}
+
+__weak_alias(verrx, _verrx);
+
diff --git a/lib/libc/gen/vwarn.c b/lib/libc/gen/vwarn.c
index 09e38664750..ded7092cec4 100644
--- a/lib/libc/gen/vwarn.c
+++ b/lib/libc/gen/vwarn.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarn.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: vwarn.c,v 1.5 2002/06/12 03:16:20 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -42,12 +42,6 @@ static char rcsid[] = "$OpenBSD: vwarn.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#include <string.h>
#include <stdarg.h>
-#ifdef __indr_reference
-__indr_reference(_vwarn, vwarn);
-#else
-__weak_alias(vwarn, _vwarn);
-#endif
-
extern char *__progname; /* Program name, from crt0. */
void
@@ -65,3 +59,6 @@ _vwarn(fmt, ap)
}
(void)fprintf(stderr, "%s\n", strerror(sverrno));
}
+
+__weak_alias(vwarn, _vwarn);
+
diff --git a/lib/libc/gen/vwarnx.c b/lib/libc/gen/vwarnx.c
index dbc56b1ca1e..1099072d7b2 100644
--- a/lib/libc/gen/vwarnx.c
+++ b/lib/libc/gen/vwarnx.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.5 2002/06/12 03:16:20 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -40,12 +40,6 @@ static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $"
#include <stdio.h>
#include <stdarg.h>
-#ifdef __indr_reference
-__indr_reference(_vwarnx, vwarnx);
-#else
-__weak_alias(vwarnx, _vwarnx);
-#endif
-
extern char *__progname; /* Program name, from crt0. */
void
@@ -58,3 +52,6 @@ _vwarnx(fmt, ap)
(void)vfprintf(stderr, fmt, ap);
(void)fprintf(stderr, "\n");
}
+
+__weak_alias(vwarnx, _vwarnx);
+
diff --git a/lib/libc/gen/warn.c b/lib/libc/gen/warn.c
index 296f2181120..c1fcf9a6835 100644
--- a/lib/libc/gen/warn.c
+++ b/lib/libc/gen/warn.c
@@ -32,19 +32,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: warn.c,v 1.5 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: warn.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(_warn, warn);
-#else
-__weak_alias(warn, _warn);
-#endif
-
void
_warn(const char *fmt, ...)
{
@@ -54,3 +48,6 @@ _warn(const char *fmt, ...)
_vwarn(fmt, ap);
va_end(ap);
}
+
+__weak_alias(warn, _warn);
+
diff --git a/lib/libc/gen/warnx.c b/lib/libc/gen/warnx.c
index 0d36214c3aa..abab25c2ded 100644
--- a/lib/libc/gen/warnx.c
+++ b/lib/libc/gen/warnx.c
@@ -32,19 +32,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: warnx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
+static char rcsid[] = "$OpenBSD: warnx.c,v 1.5 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(_warnx, warnx);
-#else
-__weak_alias(warnx, _warnx);
-#endif
-
void
_warnx(const char *fmt, ...)
{
@@ -54,3 +48,6 @@ _warnx(const char *fmt, ...)
_vwarnx(fmt, ap);
va_end(ap);
}
+
+__weak_alias(warnx, _warnx);
+