diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-15 18:19:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-15 18:19:54 +0000 |
commit | de0519636e72969a9359cf27a32e00375235e343 (patch) | |
tree | 3670fa3ad7bf3bf88d6e1ab3add73f82987d555e /sys/lib/libsa | |
parent | e018051dbb8764df0d8660f8e0e82fa3eaefb0c4 (diff) |
Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/exit.c | 16 | ||||
-rw-r--r-- | sys/lib/libsa/printf.c | 24 | ||||
-rw-r--r-- | sys/lib/libsa/stand.h | 6 |
3 files changed, 4 insertions, 42 deletions
diff --git a/sys/lib/libsa/exit.c b/sys/lib/libsa/exit.c index 7486a180968..d1b22eb9afe 100644 --- a/sys/lib/libsa/exit.c +++ b/sys/lib/libsa/exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exit.c,v 1.5 2002/03/14 01:27:07 millert Exp $ */ +/* $OpenBSD: exit.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ /* $NetBSD: exit.c,v 1.11 1996/12/01 20:22:19 pk Exp $ */ /*- @@ -28,21 +28,13 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef __STDC__ + #include <machine/stdarg.h> -#else -#include <machine/varargs.h> -#endif #include "stand.h" __dead void -#ifdef __STDC__ panic(const char *fmt, ...) -#else -panic(fmt /*, va_alist */) - char *fmt; -#endif { extern void closeall(void); va_list ap; @@ -53,11 +45,7 @@ panic(fmt /*, va_alist */) closeall(); } -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vprintf(fmt, ap); printf("\n"); va_end(ap); diff --git a/sys/lib/libsa/printf.c b/sys/lib/libsa/printf.c index 4dfe0ea69de..b3ea67de348 100644 --- a/sys/lib/libsa/printf.c +++ b/sys/lib/libsa/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.16 2002/03/14 03:16:10 millert Exp $ */ +/* $OpenBSD: printf.c,v 1.17 2002/03/15 18:19:52 millert Exp $ */ /* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */ /*- @@ -61,11 +61,7 @@ #include <sys/cdefs.h> #include <sys/types.h> -#ifdef __STDC__ #include <machine/stdarg.h> -#else -#include <machine/varargs.h> -#endif #include "stand.h" @@ -84,21 +80,12 @@ sputchar(c) } void -#ifdef __STDC__ sprintf(char *buf, const char *fmt, ...) -#else -sprintf(buf, fmt, va_alist) - char *buf, *fmt; -#endif { va_list ap; sbuf = buf; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif kdoprnt(sputchar, fmt, ap); va_end(ap); *sbuf = '\0'; @@ -106,20 +93,11 @@ sprintf(buf, fmt, va_alist) #endif /* NO_SPRINTF */ void -#ifdef __STDC__ printf(const char *fmt, ...) -#else -printf(fmt, va_alist) - char *fmt; -#endif { va_list ap; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif kdoprnt(putchar, fmt, ap); va_end(ap); } diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h index e455a713206..bd012095eea 100644 --- a/sys/lib/libsa/stand.h +++ b/sys/lib/libsa/stand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stand.h,v 1.38 2002/03/14 03:16:10 millert Exp $ */ +/* $OpenBSD: stand.h,v 1.39 2002/03/15 18:19:52 millert Exp $ */ /* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */ /*- @@ -39,11 +39,7 @@ #include <sys/types.h> #include <sys/cdefs.h> #include <sys/stat.h> -#ifdef __STDC__ #include <machine/stdarg.h> -#else -#include <machine/varargs.h> -#endif #include "saioctl.h" #include "saerrno.h" |