summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-08 04:52:56 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-06-08 04:52:56 +0000
commit14fcdc4e9f32039c3345997aa2db18b6e4bbc994 (patch)
treeae18c57617fb24427ca4336858530ea0bb1f4319 /lib/libc/gen
parente88d54b4ae55f3de545f2425ca748e132ca52617 (diff)
use weak aliases whenever is possible; millert@ ok.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/Makefile.inc5
-rw-r--r--lib/libc/gen/_err.c21
-rw-r--r--lib/libc/gen/_errx.c21
-rw-r--r--lib/libc/gen/_verr.c20
-rw-r--r--lib/libc/gen/_verrx.c20
-rw-r--r--lib/libc/gen/_vwarn.c20
-rw-r--r--lib/libc/gen/_vwarnx.c20
-rw-r--r--lib/libc/gen/_warn.c20
-rw-r--r--lib/libc/gen/_warnx.c20
-rw-r--r--lib/libc/gen/err.c9
-rw-r--r--lib/libc/gen/errx.c9
-rw-r--r--lib/libc/gen/verr.c9
-rw-r--r--lib/libc/gen/verrx.c9
-rw-r--r--lib/libc/gen/vwarn.c9
-rw-r--r--lib/libc/gen/vwarnx.c9
-rw-r--r--lib/libc/gen/warn.c9
-rw-r--r--lib/libc/gen/warnx.c9
17 files changed, 66 insertions, 173 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 7bb38733d68..19bb3710012 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.32 2002/03/16 05:50:45 millert Exp $
+# $OpenBSD: Makefile.inc,v 1.33 2002/06/08 04:52:55 fgsch Exp $
# gen sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/gen ${LIBCSRCDIR}/gen
@@ -21,8 +21,7 @@ SRCS+= alarm.c assert.c auth_subr.c authenticate.c login_cap.c basename.c \
warnx.c vwarn.c vwarnx.c verr.c verrx.c
# indirect reference stubs, to be removed soon.
-SRCS+= _err.c _errx.c _sys_errlist.c _sys_nerr.c _sys_siglist.c \
- _verr.c _verrx.c _vwarn.c _vwarnx.c _warn.c _warnx.c
+SRCS+= _sys_errlist.c _sys_nerr.c _sys_siglist.c
# machine-dependent gen sources
# m-d Makefile.inc must include sources for:
diff --git a/lib/libc/gen/_err.c b/lib/libc/gen/_err.c
deleted file mode 100644
index 34a4eb52324..00000000000
--- a/lib/libc/gen/_err.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _err.c,v 1.4 1996/08/19 08:21:19 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_err, err);
-#else
-
-#define _err err
-#define _verr verr
-#define rcsid _rcsid
-#include "err.c"
-
-#endif
diff --git a/lib/libc/gen/_errx.c b/lib/libc/gen/_errx.c
deleted file mode 100644
index 2999f50d382..00000000000
--- a/lib/libc/gen/_errx.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _errx.c,v 1.4 1996/08/19 08:21:21 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_errx, errx);
-#else
-
-#define _errx errx
-#define _verrx verrx
-#define rcsid _rcsid
-#include "errx.c"
-
-#endif
diff --git a/lib/libc/gen/_verr.c b/lib/libc/gen/_verr.c
deleted file mode 100644
index 19f06c844ab..00000000000
--- a/lib/libc/gen/_verr.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _verr.c,v 1.3 1996/08/19 08:21:29 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_verr, verr);
-#else
-
-#define _verr verr
-#define rcsid _rcsid
-#include "verr.c"
-
-#endif
diff --git a/lib/libc/gen/_verrx.c b/lib/libc/gen/_verrx.c
deleted file mode 100644
index fb82fca8629..00000000000
--- a/lib/libc/gen/_verrx.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _verrx.c,v 1.3 1996/08/19 08:21:31 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_verrx, verrx);
-#else
-
-#define _verrx verrx
-#define rcsid _rcsid
-#include "verrx.c"
-
-#endif
diff --git a/lib/libc/gen/_vwarn.c b/lib/libc/gen/_vwarn.c
deleted file mode 100644
index 3bcae0b7a4e..00000000000
--- a/lib/libc/gen/_vwarn.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _vwarn.c,v 1.3 1996/08/19 08:21:33 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_vwarn, vwarn);
-#else
-
-#define _vwarn vwarn
-#define rcsid _rcsid
-#include "vwarn.c"
-
-#endif
diff --git a/lib/libc/gen/_vwarnx.c b/lib/libc/gen/_vwarnx.c
deleted file mode 100644
index ad57e68585f..00000000000
--- a/lib/libc/gen/_vwarnx.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _vwarnx.c,v 1.3 1996/08/19 08:21:35 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_vwarnx, vwarnx);
-#else
-
-#define _vwarnx vwarnx
-#define rcsid _rcsid
-#include "vwarnx.c"
-
-#endif
diff --git a/lib/libc/gen/_warn.c b/lib/libc/gen/_warn.c
deleted file mode 100644
index 256dd71555e..00000000000
--- a/lib/libc/gen/_warn.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _warn.c,v 1.3 1996/08/19 08:21:36 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_warn, warn);
-#else
-
-#define _warn warn
-#define rcsid _rcsid
-#include "warn.c"
-
-#endif
diff --git a/lib/libc/gen/_warnx.c b/lib/libc/gen/_warnx.c
deleted file mode 100644
index 2b6cb9beb49..00000000000
--- a/lib/libc/gen/_warnx.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * J.T. Conklin, December 12, 1994
- * Public Domain
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _warnx.c,v 1.3 1996/08/19 08:21:38 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_warnx, warnx);
-#else
-
-#define _warnx warnx
-#define rcsid _rcsid
-#include "warnx.c"
-
-#endif
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c
index 701551c3705..2a25c0a08ca 100644
--- a/lib/libc/gen/err.c
+++ b/lib/libc/gen/err.c
@@ -32,12 +32,19 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: err.c,v 1.5 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.6 2002/06/08 04:52:55 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, ...)
{
diff --git a/lib/libc/gen/errx.c b/lib/libc/gen/errx.c
index 9b109de9039..f307e243b0e 100644
--- a/lib/libc/gen/errx.c
+++ b/lib/libc/gen/errx.c
@@ -32,12 +32,19 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: errx.c,v 1.4 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: errx.c,v 1.5 2002/06/08 04:52:55 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, ...)
{
diff --git a/lib/libc/gen/verr.c b/lib/libc/gen/verr.c
index 512d2565b7e..aecfc012bbd 100644
--- a/lib/libc/gen/verr.c
+++ b/lib/libc/gen/verr.c
@@ -32,9 +32,10 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verr.c,v 1.3 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: verr.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
@@ -42,6 +43,12 @@ static char rcsid[] = "$OpenBSD: verr.c,v 1.3 2002/02/19 19:39:36 millert 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
diff --git a/lib/libc/gen/verrx.c b/lib/libc/gen/verrx.c
index 3c336c75a88..8ce7ee48d7e 100644
--- a/lib/libc/gen/verrx.c
+++ b/lib/libc/gen/verrx.c
@@ -32,14 +32,21 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verrx.c,v 1.3 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: verrx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <err.h>
#include <stdio.h>
#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
diff --git a/lib/libc/gen/vwarn.c b/lib/libc/gen/vwarn.c
index d659ace55c8..09e38664750 100644
--- a/lib/libc/gen/vwarn.c
+++ b/lib/libc/gen/vwarn.c
@@ -32,15 +32,22 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarn.c,v 1.3 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: vwarn.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#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
diff --git a/lib/libc/gen/vwarnx.c b/lib/libc/gen/vwarnx.c
index 40619302413..dbc56b1ca1e 100644
--- a/lib/libc/gen/vwarnx.c
+++ b/lib/libc/gen/vwarnx.c
@@ -32,13 +32,20 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.3 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.4 2002/06/08 04:52:55 fgsch Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <err.h>
#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
diff --git a/lib/libc/gen/warn.c b/lib/libc/gen/warn.c
index cfb4e66c363..296f2181120 100644
--- a/lib/libc/gen/warn.c
+++ b/lib/libc/gen/warn.c
@@ -32,12 +32,19 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: warn.c,v 1.4 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: warn.c,v 1.5 2002/06/08 04:52:55 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, ...)
{
diff --git a/lib/libc/gen/warnx.c b/lib/libc/gen/warnx.c
index f7255262716..0d36214c3aa 100644
--- a/lib/libc/gen/warnx.c
+++ b/lib/libc/gen/warnx.c
@@ -32,12 +32,19 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: warnx.c,v 1.3 2002/02/19 19:39:36 millert Exp $";
+static char rcsid[] = "$OpenBSD: warnx.c,v 1.4 2002/06/08 04:52:55 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, ...)
{