diff options
| author | christos <christos@NetBSD.org> | 1999-03-01 16:40:07 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1999-03-01 16:40:07 +0000 |
| commit | 26475619ed15fdce4c7b6ad4ef91f3c76d283dc8 (patch) | |
| tree | e0eee4634797cb318e36f56e422c439ff88450b8 /libexec/ld.elf_so/debug.c | |
| parent | bc97a25328d2eb9c55a45e1190fa74f0e6001568 (diff) | |
KNF
Diffstat (limited to 'libexec/ld.elf_so/debug.c')
| -rw-r--r-- | libexec/ld.elf_so/debug.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/libexec/ld.elf_so/debug.c b/libexec/ld.elf_so/debug.c index c4e27723875..138148d0885 100644 --- a/libexec/ld.elf_so/debug.c +++ b/libexec/ld.elf_so/debug.c @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.1 1996/12/16 20:37:57 cgd Exp $ */ +/* $NetBSD: debug.c,v 1.2 1999/03/01 16:40:07 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -35,7 +35,12 @@ * Support for printing debugging messages. */ +#include <sys/cdefs.h> +#ifdef __STDC__ #include <stdarg.h> +#else +#include <varargs.h> +#endif #include "debug.h" #include "rtldenv.h" @@ -44,16 +49,28 @@ int debug = 0; void +#ifdef __STDC__ debug_printf(const char *format, ...) +#else +debug_printf(va_alist) + va_dcl +#endif { - if(debug) { - va_list ap; - va_start(ap, format); + if(debug) { + va_list ap; +#ifdef __STDC__ + va_start(ap, format); +#else + const char *format; + + va_start(ap); + format = va_arg(ap, const char *); +#endif - xvprintf(format, ap); + xvprintf(format, ap); - va_end(ap); - xprintf("\n"); - } + va_end(ap); + xprintf("\n"); + } } #endif |
