diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-11-22 00:13:07 +0400 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-11-22 00:13:07 +0400 |
commit | beaf1df02c4666f53180847da8d214e25711b4dd (patch) | |
tree | 5ef6ef5f944af0f1a00d5ea7c459182518bcdb55 /winsup/cygwin/termios.cc | |
parent | c342c2eb57e339cc935e400dba2e4c30a9306715 (diff) |
* termios.cc (cfsetspeed): New function.
* cygwin.din (cfsetspeed): Export.
* posix.sgml (std-bsd): Add cfsetspeed.
* include/sys/termios.h (cfsetspeed): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/termios.cc')
-rw-r--r-- | winsup/cygwin/termios.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc index 0fb0de2ad..80c686952 100644 --- a/winsup/cygwin/termios.cc +++ b/winsup/cygwin/termios.cc @@ -328,6 +328,20 @@ cfsetispeed (struct termios *in_tp, speed_t speed) return res; } +/* cfsetspeed: 4.4BSD */ +extern "C" int +cfsetspeed (struct termios *in_tp, speed_t speed) +{ + struct termios *tp = __tonew_termios (in_tp); + int res; + /* errors come only from unsupported baud rates, so setspeed() would return + identical results in both calls */ + if ((res = setspeed (tp->c_ospeed, speed)) == 0) + setspeed (tp->c_ispeed, speed); + __toapp_termios (in_tp, tp); + return res; +} + extern "C" void cfmakeraw(struct termios *tp) { |