Fix varyadic non ansi functions.

This commit is contained in:
christos 1996-10-22 16:57:51 +00:00
parent 8ca5cce5c7
commit 1b51e8821e

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsutil.c,v 1.2 1996/10/03 20:06:31 christos Exp $ */ /* $NetBSD: fsutil.c,v 1.3 1996/10/22 16:57:51 christos Exp $ */
/* /*
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
@ -33,7 +33,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint #ifndef lint
static char rcsid[] = "$NetBSD: fsutil.c,v 1.2 1996/10/03 20:06:31 christos Exp $"; static char rcsid[] = "$NetBSD: fsutil.c,v 1.3 1996/10/22 16:57:51 christos Exp $";
#endif /* not lint */ #endif /* not lint */
#include <stdio.h> #include <stdio.h>
@ -87,8 +87,7 @@ void
#if __STDC__ #if __STDC__
errexit(const char *fmt, ...) errexit(const char *fmt, ...)
#else #else
errexit(fmt, va_alist) errexit(va_alist)
char *fmt;
va_dcl va_dcl
#endif #endif
{ {
@ -97,7 +96,10 @@ errexit(fmt, va_alist)
#if __STDC__ #if __STDC__
va_start(ap, fmt); va_start(ap, fmt);
#else #else
const char *fmt;
va_start(ap); va_start(ap);
fmt = va_arg(ap, const char *);
#endif #endif
(void) vfprintf(stderr, fmt, ap); (void) vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
@ -131,8 +133,7 @@ void
#if __STDC__ #if __STDC__
pfatal(const char *fmt, ...) pfatal(const char *fmt, ...)
#else #else
pfatal(fmt, va_alist) pfatal(va_alist)
char *fmt;
va_dcl va_dcl
#endif #endif
{ {
@ -141,7 +142,10 @@ pfatal(fmt, va_alist)
#if __STDC__ #if __STDC__
va_start(ap, fmt); va_start(ap, fmt);
#else #else
const char *fmt;
va_start(ap); va_start(ap);
fmt = va_arg(ap, const char *);
#endif #endif
vmsg(1, fmt, ap); vmsg(1, fmt, ap);
va_end(ap); va_end(ap);
@ -152,17 +156,18 @@ void
#if __STDC__ #if __STDC__
pwarn(const char *fmt, ...) pwarn(const char *fmt, ...)
#else #else
pwarn(fmt, va_alist) pwarn(va_alist)
char *fmt;
va_dcl va_dcl
#endif #endif
{ {
va_list ap; va_list ap;
#if __STDC__ #if __STDC__
va_start(ap, fmt); va_start(ap, fmt);
#else #else
const char *fmt;
va_start(ap); va_start(ap);
fmt = va_arg(ap, const char *);
#endif #endif
vmsg(0, fmt, ap); vmsg(0, fmt, ap);
va_end(ap); va_end(ap);
@ -179,8 +184,7 @@ void
#if __STDC__ #if __STDC__
panic(const char *fmt, ...) panic(const char *fmt, ...)
#else #else
panic(fmt, va_alist) panic(va_alist)
char *fmt;
va_dcl va_dcl
#endif #endif
{ {
@ -189,7 +193,10 @@ panic(fmt, va_alist)
#if __STDC__ #if __STDC__
va_start(ap, fmt); va_start(ap, fmt);
#else #else
const char *fmt;
va_start(ap); va_start(ap);
fmt = va_arg(ap, const char *);
#endif #endif
vmsg(1, fmt, ap); vmsg(1, fmt, ap);
va_end(ap); va_end(ap);