aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-07 23:57:08 +0000
committerRichard M. Stallman1993-06-07 23:57:08 +0000
commitd7272cff92348539fea6451fd7ee4f926914f97c (patch)
tree95c1afc8a82a620d77435d11674e4e00e9729196 /src
parentcef13e5501f7033a96df8045a1fcbeabc7f889c0 (diff)
downloademacs-d7272cff92348539fea6451fd7ee4f926914f97c.tar.gz
emacs-d7272cff92348539fea6451fd7ee4f926914f97c.zip
(init_baud_rate) [HAVE_TERMIOS]: Use cfgetospeed.
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index db3a747d8cc..982d361ae2a 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -239,7 +239,7 @@ init_baud_rate ()
239 239
240 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600; 240 sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600;
241 tcgetattr (0, &sg); 241 tcgetattr (0, &sg);
242 ospeed = sg.c_cflag & CBAUD; 242 ospeed = cfgetospeed (&sg);
243#else /* neither VMS nor TERMIOS */ 243#else /* neither VMS nor TERMIOS */
244#ifdef HAVE_TERMIO 244#ifdef HAVE_TERMIO
245 struct termio sg; 245 struct termio sg;
@@ -255,7 +255,8 @@ init_baud_rate ()
255 struct sgttyb sg; 255 struct sgttyb sg;
256 256
257 sg.sg_ospeed = B9600; 257 sg.sg_ospeed = B9600;
258 ioctl (0, TIOCGETP, &sg); 258 if (ioctl (0, TIOCGETP, &sg) < 0)
259 abort ();
259 ospeed = sg.sg_ospeed; 260 ospeed = sg.sg_ospeed;
260#endif /* not HAVE_TERMIO */ 261#endif /* not HAVE_TERMIO */
261#endif /* not HAVE_TERMIOS */ 262#endif /* not HAVE_TERMIOS */