2000-03-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / remote-os9k.c
index 9bb927ef5018f00cf720bbb1342e75d257cdf43b..dd821154e42718eb4c642e155c1a857115c4dc73 100644 (file)
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include "gdb_wait.h"
 #include <signal.h>
 #include "gdb_string.h"
 #include <sys/types.h>
@@ -93,24 +88,13 @@ static char readbuf[16];
 
 /* Send data to monitor.  Works just like printf. */
 static void
-#ifdef ANSI_PROTOTYPES
 printf_monitor (char *pattern,...)
-#else
-printf_monitor (va_alist)
-     va_dcl
-#endif
 {
   va_list args;
   char buf[200];
   int i;
 
-#ifdef ANSI_PROTOTYPES
   va_start (args, pattern);
-#else
-  char *pattern;
-  va_start (args);
-  pattern = va_arg (args, char *);
-#endif
 
   vsprintf (buf, pattern, args);
   va_end (args);
@@ -528,12 +512,8 @@ rombug_wait (pid, status)
     {
       if (obj_sec->objfile != symfile_objfile)
        new_symfile_objfile (obj_sec->objfile, 1, 0);
-      offs = ((struct section_offsets *)
-             alloca (sizeof (struct section_offsets)
-              + (symfile_objfile->num_sections * sizeof (offs->offsets))));
-      memcpy (offs, symfile_objfile->section_offsets,
-             (sizeof (struct section_offsets) +
-                (symfile_objfile->num_sections * sizeof (offs->offsets))));
+      offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+      memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
       ANOFFSET (offs, SECT_OFF_DATA) = addr;
       ANOFFSET (offs, SECT_OFF_BSS) = addr;
 
@@ -1094,7 +1074,7 @@ connect_command (args, fromtty)
       do
        {
          FD_SET (0, &readfds);
-         FD_SET (monitor_desc, &readfds);
+         FD_SET (DEPRECATED_SERIAL_FD (monitor_desc), &readfds);
          numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
        }
       while (numfds == 0);
@@ -1129,7 +1109,7 @@ connect_command (args, fromtty)
            }
        }
 
-      if (FD_ISSET (monitor_desc, &readfds))
+      if (FD_ISSET (DEPRECATED_SERIAL_FD (monitor_desc), &readfds))
        {
          while (1)
            {
This page took 0.025363 seconds and 4 git commands to generate.