2004-02-12 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / ser-pipe.c
index 3e232872301b1564dacf80606b3d9027c23e4940..3e04973f854a91d2a2c23a346462c333ae68be98 100644 (file)
@@ -34,8 +34,8 @@
 
 #include <signal.h>
 
-static int pipe_open (serial_t scb, const char *name);
-static void pipe_close (serial_t scb);
+static int pipe_open (struct serial *scb, const char *name);
+static void pipe_close (struct serial *scb);
 
 extern void _initialize_ser_pipe (void);
 
@@ -47,7 +47,7 @@ struct pipe_state
 /* Open up a raw pipe */
 
 static int
-pipe_open (serial_t scb, const char *name)
+pipe_open (struct serial *scb, const char *name)
 {
 #if !HAVE_SOCKETPAIR
   return -1;
@@ -98,7 +98,7 @@ pipe_open (serial_t scb, const char *name)
       for (old = pidlist; old; old = old->next)
        close (fileno (old->fp));       /* don't allow a flush */
 #endif
-      execl ("/bin/sh", "sh", "-c", name, NULL);
+      execl ("/bin/sh", "sh", "-c", name, (char *) 0);
       _exit (127);
     }
 
@@ -117,7 +117,7 @@ pipe_open (serial_t scb, const char *name)
 }
 
 static void
-pipe_close (serial_t scb)
+pipe_close (struct serial *scb)
 {
   struct pipe_state *state = scb->state;
   if (state != NULL)
@@ -138,7 +138,7 @@ void
 _initialize_ser_pipe (void)
 {
   struct serial_ops *ops = XMALLOC (struct serial_ops);
-  memset (ops, sizeof (struct serial_ops), 0);
+  memset (ops, 0, sizeof (struct serial_ops));
   ops->name = "pipe";
   ops->next = 0;
   ops->open = pipe_open;
This page took 0.025052 seconds and 4 git commands to generate.