Follow the example of other nbtool compat functions, like dirname, and

don't create if it is determined that the system in question doesn't need
them.  This cleans up build warnings on systems with err.h (HAVE_ERR_H)
for example Mac OS X 10.3.
This commit is contained in:
ginsbach 2007-06-18 14:13:54 +00:00
parent ad838ebf9b
commit 2f41073256
8 changed files with 32 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: err.c,v 1.25 2005/09/13 13:51:50 christos Exp $ */
/* $NetBSD: err.c,v 1.26 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: err.c,v 1.25 2005/09/13 13:51:50 christos Exp $");
__RCSID("$NetBSD: err.c,v 1.26 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -50,6 +50,7 @@ __RCSID("$NetBSD: err.c,v 1.25 2005/09/13 13:51:50 christos Exp $");
__weak_alias(err, _err)
#endif
#if !HAVE_ERR_H
__dead void
err(int eval, const char *fmt, ...)
{
@ -59,3 +60,4 @@ err(int eval, const char *fmt, ...)
verr(eval, fmt, ap);
va_end(ap);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: errx.c,v 1.13 2005/09/13 13:51:50 christos Exp $ */
/* $NetBSD: errx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: errx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__RCSID("$NetBSD: errx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -50,6 +50,7 @@ __RCSID("$NetBSD: errx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__weak_alias(errx, _errx)
#endif
#if !HAVE_ERR_H
__dead void
errx(int eval, const char *fmt, ...)
{
@ -59,3 +60,4 @@ errx(int eval, const char *fmt, ...)
verrx(eval, fmt, ap);
va_end(ap);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: verr.c,v 1.13 2005/09/13 01:44:09 christos Exp $ */
/* $NetBSD: verr.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: verr.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__RCSID("$NetBSD: verr.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -54,6 +54,7 @@ __RCSID("$NetBSD: verr.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__weak_alias(verr, _verr)
#endif
#if !HAVE_ERR_H
__dead void
verr(int eval, const char *fmt, _BSD_VA_LIST_ ap)
{
@ -68,3 +69,4 @@ verr(int eval, const char *fmt, _BSD_VA_LIST_ ap)
(void)fprintf(stderr, "%s\n", strerror(sverrno));
exit(eval);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: verrx.c,v 1.13 2005/09/13 01:44:09 christos Exp $ */
/* $NetBSD: verrx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: verrx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__RCSID("$NetBSD: verrx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -52,6 +52,7 @@ __RCSID("$NetBSD: verrx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__weak_alias(verrx, _verrx)
#endif
#if !HAVE_ERR_H
__dead void
verrx(int eval, const char *fmt, _BSD_VA_LIST_ ap)
{
@ -61,3 +62,4 @@ verrx(int eval, const char *fmt, _BSD_VA_LIST_ ap)
(void)fprintf(stderr, "\n");
exit(eval);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vwarn.c,v 1.13 2005/09/13 01:44:09 christos Exp $ */
/* $NetBSD: vwarn.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vwarn.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__RCSID("$NetBSD: vwarn.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -54,6 +54,7 @@ __RCSID("$NetBSD: vwarn.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__weak_alias(vwarn, _vwarn)
#endif
#if !HAVE_ERR_H
void
vwarn(const char *fmt, _BSD_VA_LIST_ ap)
{
@ -67,3 +68,4 @@ vwarn(const char *fmt, _BSD_VA_LIST_ ap)
}
(void)fprintf(stderr, "%s\n", strerror(sverrno));
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vwarnx.c,v 1.13 2005/09/13 01:44:09 christos Exp $ */
/* $NetBSD: vwarnx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vwarnx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__RCSID("$NetBSD: vwarnx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -52,6 +52,7 @@ __RCSID("$NetBSD: vwarnx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
__weak_alias(vwarnx, _vwarnx)
#endif
#if !HAVE_ERR_H
void
vwarnx(const char *fmt, _BSD_VA_LIST_ ap)
{
@ -60,3 +61,4 @@ vwarnx(const char *fmt, _BSD_VA_LIST_ ap)
(void)vfprintf(stderr, fmt, ap);
(void)fprintf(stderr, "\n");
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: warn.c,v 1.13 2005/09/13 13:51:50 christos Exp $ */
/* $NetBSD: warn.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: warn.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__RCSID("$NetBSD: warn.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -50,6 +50,7 @@ __RCSID("$NetBSD: warn.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__weak_alias(warn, _warn)
#endif
#if !HAVE_ERR_H
void
warn(const char *fmt, ...)
{
@ -59,3 +60,4 @@ warn(const char *fmt, ...)
vwarn(fmt, ap);
va_end(ap);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: warnx.c,v 1.13 2005/09/13 13:51:50 christos Exp $ */
/* $NetBSD: warnx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $ */
/*-
* Copyright (c) 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: warnx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__RCSID("$NetBSD: warnx.c,v 1.14 2007/06/18 14:13:54 ginsbach Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -50,6 +50,7 @@ __RCSID("$NetBSD: warnx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
__weak_alias(warnx, _warnx)
#endif
#if !HAVE_ERR_H
void
warnx(const char *fmt, ...)
{
@ -59,3 +60,4 @@ warnx(const char *fmt, ...)
vwarnx(fmt, ap);
va_end(ap);
}
#endif