aboutsummaryrefslogtreecommitdiff
path: root/gdb/serial.h
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-09-09 04:09:56 +0000
committerStu Grossman <grossman@cygnus>1992-09-09 04:09:56 +0000
commited3f6049b487b585b9ebaf6f0847c9df271719ec (patch)
tree8539da381f4287454e753bbd7b1cd5a14835b06e /gdb/serial.h
parenta904db53486bd7ac244a83e59e3274eb869575f4 (diff)
downloadfsf-binutils-gdb-ed3f6049b487b585b9ebaf6f0847c9df271719ec.zip
fsf-binutils-gdb-ed3f6049b487b585b9ebaf6f0847c9df271719ec.tar.gz
fsf-binutils-gdb-ed3f6049b487b585b9ebaf6f0847c9df271719ec.tar.bz2
* serial.h: Fix prototye for serial_raw().
* ser-bsd.c, ser-termios.c: Fix args for serial_open() & serial_write() to match prototypes. * remote-st2000.c (get_reg_name): Make *p be const.
Diffstat (limited to 'gdb/serial.h')
-rw-r--r--gdb/serial.h47
1 files changed, 23 insertions, 24 deletions
diff --git a/gdb/serial.h b/gdb/serial.h
index 2944bb6..796f2d2 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -17,6 +17,27 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#ifdef HAVE_TERMIO
+
+#include <termios.h>
+#include <unistd.h>
+
+struct ttystate
+{
+ int flags; /* Flags from fcntl F_GETFL */
+ struct termios termios; /* old tty driver settings */
+};
+
+#else /* not HAVE_TERMIO */
+
+#include <sgtty.h>
+
+struct ttystate {
+ int flags; /* Flags from fcntl F_GETFL */
+ struct sgttyb sgttyb; /* old tty driver settings */
+};
+
+#endif /* not HAVE_TERMIO */
/* Return a sensible default name for a serial device, something which
can be used as an argument to serial_open. */
@@ -28,7 +49,7 @@ int serial_open PARAMS ((const char *name));
/* Turn the port into raw mode. */
-void serial_raw PARAMS ((void));
+void serial_raw PARAMS ((int fd, struct ttystate *oldstate));
/* Turn the port into normal mode. */
@@ -49,30 +70,8 @@ int serial_setbaudrate PARAMS ((int rate));
/* Write some chars to the device, returns 0 for failure. See errno for
details. */
-int serial_write PARAMS ((const char *str , int len));
+int serial_write PARAMS ((const char *str, int len));
/* Close the serial port */
void serial_close PARAMS ((void));
-
-#ifdef HAVE_TERMIO
-
-#include <termios.h>
-#include <unistd.h>
-
-struct ttystate
-{
- int flags; /* Flags from fcntl F_GETFL */
- struct termios termios; /* old tty driver settings */
-};
-
-#else /* not HAVE_TERMIO */
-
-#include <sgtty.h>
-
-struct ttystate {
- int flags; /* Flags from fcntl F_GETFL */
- struct sgttyb sgttyb; /* old tty driver settings */
-};
-
-#endif /* not HAVE_TERMIO */