* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / complaints.c
index 079ca5adc643b1f41565e2113fce165405d97dd7..72a7d33b52bbc881a7744a943d745d4cc7ee74fc 100644 (file)
@@ -20,7 +20,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "defs.h"
 #include "complaints.h"
 #include "gdbcmd.h"
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 
 /* Structure to manage complaints about symbol file contents.  */
 
@@ -59,14 +63,23 @@ extern int info_verbose;
 
 /* VARARGS */
 void
+#ifdef ANSI_PROTOTYPES
+complain (struct complaint *complaint, ...)
+#else
 complain (va_alist)
      va_dcl
+#endif
 {
   va_list args;
+#ifdef ANSI_PROTOTYPES
+  va_start (args, complaint);
+#else
   struct complaint *complaint;
 
   va_start (args);
   complaint = va_arg (args, struct complaint *);
+#endif
+
   complaint -> counter++;
   if (complaint -> next == NULL)
     {
@@ -112,7 +125,7 @@ complain (va_alist)
   /* If GDB dumps core, we'd like to see the complaints first.  Presumably
      GDB will not be sending so many complaints that this becomes a
      performance hog.  */
-  fflush (stdout);
+  gdb_flush (gdb_stdout);
   va_end (args);
 }
 
This page took 0.023565 seconds and 4 git commands to generate.