diff options
author | Stu Grossman <grossman@cygnus> | 1992-09-09 04:09:56 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-09-09 04:09:56 +0000 |
commit | ed3f6049b487b585b9ebaf6f0847c9df271719ec (patch) | |
tree | 8539da381f4287454e753bbd7b1cd5a14835b06e | |
parent | a904db53486bd7ac244a83e59e3274eb869575f4 (diff) | |
download | gdb-ed3f6049b487b585b9ebaf6f0847c9df271719ec.zip gdb-ed3f6049b487b585b9ebaf6f0847c9df271719ec.tar.gz 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.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/remote-st2000.c | 3 | ||||
-rw-r--r-- | gdb/ser-bsd.c | 4 | ||||
-rw-r--r-- | gdb/ser-termios.c | 4 | ||||
-rw-r--r-- | gdb/serial.h | 47 |
5 files changed, 36 insertions, 29 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bcce28e..fd098d0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +Tue Sep 8 21:05:18 1992 Stu Grossman (grossman at cygnus.com) + + * 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. + Tue Sep 8 17:24:52 1992 Ken Raeburn (raeburn@cambridge.cygnus.com) * remote-nindy.c (nindy_fetch_registers): Make return type void, diff --git a/gdb/remote-st2000.c b/gdb/remote-st2000.c index 4fddb3c..0c70ec0 100644 --- a/gdb/remote-st2000.c +++ b/gdb/remote-st2000.c @@ -399,7 +399,8 @@ get_reg_name (regno) int regno; { static char buf[50]; - char *p, *b; + const char *p; + char *b; b = buf; diff --git a/gdb/ser-bsd.c b/gdb/ser-bsd.c index 6479ba1..45db6cc 100644 --- a/gdb/ser-bsd.c +++ b/gdb/ser-bsd.c @@ -67,7 +67,7 @@ static fd_set readfds; int serial_open(name) - char *name; + const char *name; { struct sgttyb sgttyb; @@ -198,7 +198,7 @@ serial_setbaudrate(rate) int serial_write(str, len) - char *str; + const char *str; int len; { int cc; diff --git a/gdb/ser-termios.c b/gdb/ser-termios.c index 0a11f08..881689f 100644 --- a/gdb/ser-termios.c +++ b/gdb/ser-termios.c @@ -70,7 +70,7 @@ static fd_set readfds; int serial_open(name) - char *name; + const char *name; { struct termios termios; @@ -193,7 +193,7 @@ serial_setbaudrate(rate) int serial_write(str, len) - char *str; + const char *str; int len; { int cc; 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 */ |