From 73d3dbd4e6ab70e29986e6d706b548cdc39c3531 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Fri, 19 May 1995 14:15:48 +0000 Subject: [PATCH] * utils.c, complaints.c, language.c, monitor.c, remote-array.c, remote-mips.c, remote-os9k.c, remote-st.c: Conditionalize use of stdarg rather than varargs on ANSI_PROTOTYPES not __STDC__; it must match the definition of PARAMS. start-sanitize-gdbtk * gdbtk.c: Likewise. end-sanitize-gdbtk --- gdb/ChangeLog | 10 ++++++++++ gdb/complaints.c | 6 +++--- gdb/gdbtk.c | 6 +++--- gdb/language.c | 10 +++++----- gdb/remote-array.c | 10 +++++----- gdb/remote-mips.c | 6 +++--- gdb/remote-os9k.c | 6 +++--- gdb/remote-st.c | 6 +++--- 8 files changed, 35 insertions(+), 25 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b9e336045b8..e9f143a9f86 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Fri May 19 06:15:40 1995 Jim Kingdon + + * utils.c, complaints.c, language.c, monitor.c, remote-array.c, + remote-mips.c, remote-os9k.c, remote-st.c: Conditionalize use of + stdarg rather than varargs on ANSI_PROTOTYPES not __STDC__; it + must match the definition of PARAMS. +start-sanitize-gdbtk + * gdbtk.c: Likewise. +end-sanitize-gdbtk + Thu May 18 15:58:46 1995 J.T. Conklin * utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered, diff --git a/gdb/complaints.c b/gdb/complaints.c index b5511437155..72a7d33b52b 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "defs.h" #include "complaints.h" #include "gdbcmd.h" -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -63,7 +63,7 @@ extern int info_verbose; /* VARARGS */ void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES complain (struct complaint *complaint, ...) #else complain (va_alist) @@ -71,7 +71,7 @@ complain (va_alist) #endif { va_list args; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, complaint); #else struct complaint *complaint; diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 848502503cb..9a8d0b3d874 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -29,7 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "target.h" #include #include -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -140,7 +140,7 @@ gdbtk_query (query, args) } static void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES dsprintf_append_element (Tcl_DString *dsp, char *format, ...) #else dsprintf_append_element (va_alist) @@ -150,7 +150,7 @@ dsprintf_append_element (va_alist) va_list args; char buf[1024]; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, format); #else Tcl_DString *dsp; diff --git a/gdb/language.c b/gdb/language.c index 3c27b7d9180..f989cb2aec1 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -29,7 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "defs.h" #include -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -982,7 +982,7 @@ op_error (fmt,op,fatal) by the value of warning_pre_print and we do not return to the top level. */ void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES type_error (char *string, ...) #else type_error (va_alist) @@ -990,7 +990,7 @@ type_error (va_alist) #endif { va_list args; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, string); #else char *string; @@ -1011,7 +1011,7 @@ type_error (va_alist) } void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES range_error (char *string, ...) #else range_error (va_alist) @@ -1019,7 +1019,7 @@ range_error (va_alist) #endif { va_list args; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, string); #else char *string; diff --git a/gdb/remote-array.c b/gdb/remote-array.c index dc1c4640465..b7a9f4c109b 100644 --- a/gdb/remote-array.c +++ b/gdb/remote-array.c @@ -28,7 +28,7 @@ #include "gdbcore.h" #include "target.h" #include "wait.h" -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -173,7 +173,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", * printf_monitor -- send data to monitor. Works just like printf. */ static void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES printf_monitor(char *pattern, ...) #else printf_monitor(va_alist) @@ -184,7 +184,7 @@ printf_monitor(va_alist) char buf[PBUFSIZ]; int i; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start(args, pattern); #else char *pattern; @@ -224,7 +224,7 @@ write_monitor(data, len) * to be formatted and printed. A CR is added after each string is printed. */ static void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES debuglogs(int level, char *pattern, ...) #else debuglogs(va_alist) @@ -237,7 +237,7 @@ debuglogs(va_alist) char newbuf[PBUFSIZ]; int i; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start(args, pattern); #else char *pattern; diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 568694c6037..170a6ba0746 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -31,7 +31,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "remote-utils.h" #include -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -275,7 +275,7 @@ static serial_t mips_desc; inconsistent state. */ static NORETURN void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES mips_error (char *string, ...) #else mips_error (va_alist) @@ -284,7 +284,7 @@ mips_error (va_alist) { va_list args; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, string); #else char *string; diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c index 2dc526c5d5b..69cf3e46dc2 100644 --- a/gdb/remote-os9k.c +++ b/gdb/remote-os9k.c @@ -37,7 +37,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcore.h" #include "target.h" #include "wait.h" -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -90,7 +90,7 @@ static char readbuf[16]; /* Send data to monitor. Works just like printf. */ static void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES printf_monitor(char *pattern, ...) #else printf_monitor(va_alist) @@ -101,7 +101,7 @@ printf_monitor(va_alist) char buf[200]; int i; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start (args, pattern); #else char *pattern; diff --git a/gdb/remote-st.c b/gdb/remote-st.c index b74ba131885..50c5678bffa 100644 --- a/gdb/remote-st.c +++ b/gdb/remote-st.c @@ -38,7 +38,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcore.h" #include "target.h" #include "wait.h" -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #include @@ -70,7 +70,7 @@ static serial_t st2000_desc; /* Send data to stdebug. Works just like printf. */ static void -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES printf_stdebug(char *pattern, ...) #else printf_stdebug(va_alist) @@ -80,7 +80,7 @@ printf_stdebug(va_alist) va_list args; char buf[200]; -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES va_start(args, pattern); #else char *pattern; -- 2.30.2