[Ada] move some variables to scope where they are used
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index 07abf2b62094a41e9d5348df4a10759b7d8919ea..266453c2c1e99979da320c97791ab2b453000685 100644 (file)
@@ -1,7 +1,7 @@
 /* Serial interface for local (hardwired) serial ports on Un*x like systems
 
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2003,
-   2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -306,6 +306,7 @@ hardwire_drain_output (struct serial *scb)
      to be discarded. */
   {
     struct hardwire_ttystate state;
+
     if (get_tty_state (scb, &state))
       {
        return (-1);
@@ -368,16 +369,13 @@ hardwire_send_break (struct serial *scb)
 #ifdef HAVE_SGTTY
   {
     int status;
-    struct timeval timeout;
 
     status = ioctl (scb->fd, TIOCSBRK, 0);
 
     /* Can't use usleep; it doesn't exist in BSD 4.2.  */
-    /* Note that if this select() is interrupted by a signal it will not wait
-       the full length of time.  I think that is OK.  */
-    timeout.tv_sec = 0;
-    timeout.tv_usec = 250000;
-    gdb_select (0, 0, 0, 0, &timeout);
+    /* Note that if this gdb_select() is interrupted by a signal it will not
+       wait the full length of time.  I think that is OK.  */
+    gdb_usleep (250000);
     status = ioctl (scb->fd, TIOCCBRK, 0);
     return status;
   }
@@ -891,6 +889,7 @@ void
 _initialize_ser_hardwire (void)
 {
   struct serial_ops *ops = XMALLOC (struct serial_ops);
+
   memset (ops, 0, sizeof (struct serial_ops));
   ops->name = "hardwire";
   ops->next = 0;
This page took 0.026528 seconds and 4 git commands to generate.