mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
printf_filtered, printf_unfiltered, printfi_filtered, query, warning,
error, fatal, fatal_dump_core): Use stdarg.h macros when compiling
with an ANSI compiler.
* complain.c (complain): Likewise.
* language.c (type_error, range_error): Likewise.
* monitor.c (monitor_printf, monitor_printf_noecho): Likewise.
* remote-array.c (printf_monitor, debuglogs): Likewise.
* remote-mips.c (mips_error): Likewise.
* remote-os9k.c (printf_monitor): Likewise.
* remote-st.c (printf_stdebug): Likewise.
* gdbtk.c (gdbtk_query): Likewise.
* defs.h, complain.h, language.h, monitor.h: Add prototypes to
match above changes.
* printcmd.c: Remove uneeded #include <varargs.h>.
* remote-e7000.c: Likewise.
* f-typeprint.c (f_type_print_base): Fix typo found by above
changes.
This commit is contained in:
@@ -31,7 +31,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#include "remote-utils.h"
|
||||
|
||||
#include <signal.h>
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
extern char *mips_read_processor_type PARAMS ((void));
|
||||
|
||||
@@ -271,19 +275,28 @@ static serial_t mips_desc;
|
||||
inconsistent state. */
|
||||
|
||||
static NORETURN void
|
||||
#ifdef __STDC__
|
||||
mips_error (char *string, ...)
|
||||
#else
|
||||
mips_error (va_alist)
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list args;
|
||||
char *string;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start (args, string);
|
||||
#else
|
||||
char *string;
|
||||
va_start (args);
|
||||
string = va_arg (args, char *);
|
||||
#endif
|
||||
|
||||
target_terminal_ours ();
|
||||
wrap_here(""); /* Force out any buffered output */
|
||||
gdb_flush (gdb_stdout);
|
||||
if (error_pre_print)
|
||||
fprintf_filtered (gdb_stderr, error_pre_print);
|
||||
string = va_arg (args, char *);
|
||||
vfprintf_filtered (gdb_stderr, string, args);
|
||||
fprintf_filtered (gdb_stderr, "\n");
|
||||
va_end (args);
|
||||
|
||||
Reference in New Issue
Block a user