diff options
Diffstat (limited to 'gdb/remote-os9k.c')
-rw-r--r-- | gdb/remote-os9k.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c index a4f4e86..2dc526c 100644 --- a/gdb/remote-os9k.c +++ b/gdb/remote-os9k.c @@ -37,7 +37,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcore.h" #include "target.h" #include "wait.h" +#ifdef __STDC__ +#include <stdarg.h> +#else #include <varargs.h> +#endif #include <signal.h> #include <string.h> #include <sys/types.h> @@ -86,19 +90,27 @@ static char readbuf[16]; /* Send data to monitor. Works just like printf. */ static void +#ifdef __STDC__ +printf_monitor(char *pattern, ...) +#else printf_monitor(va_alist) va_dcl +#endif { va_list args; - char *pattern; char buf[200]; int i; +#ifdef __STDC__ + va_start (args, pattern); +#else + char *pattern; va_start(args); - pattern = va_arg(args, char *); +#endif vsprintf(buf, pattern, args); + va_end(args); if (SERIAL_WRITE(monitor_desc, buf, strlen(buf))) fprintf(stderr, "SERIAL_WRITE failed: %s\n", safe_strerror(errno)); |