diff options
author | Christopher Faylor <me@cgf.cx> | 2006-02-28 01:31:04 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-02-28 01:31:04 +0000 |
commit | 6a7a2f4bbe6f231892df398f40c6293546e7c0c2 (patch) | |
tree | d0846ba4aca1e0a625868dd930142c2927a1b1c0 /winsup/cygwin/include/sys | |
parent | f6f3b1ee4634682c8415e4d2515513c68b54d260 (diff) | |
download | cygnal-6a7a2f4bbe6f231892df398f40c6293546e7c0c2.tar.gz cygnal-6a7a2f4bbe6f231892df398f40c6293546e7c0c2.tar.bz2 cygnal-6a7a2f4bbe6f231892df398f40c6293546e7c0c2.zip |
* include/sys/termios.h (cfsetispeed): Just define as a function rather than
resorting to a macro.
(cfsetospeed): Ditto.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r-- | winsup/cygwin/include/sys/termios.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h index 589c91a57..51e31ac0a 100644 --- a/winsup/cygwin/include/sys/termios.h +++ b/winsup/cygwin/include/sys/termios.h @@ -1,6 +1,6 @@ /* sys/termios.h - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc. This file is part of Cygwin. @@ -234,26 +234,28 @@ typedef unsigned int speed_t; typedef unsigned short otcflag_t; typedef unsigned char ospeed_t; -struct __oldtermios { - otcflag_t c_iflag; - otcflag_t c_oflag; - otcflag_t c_cflag; - otcflag_t c_lflag; - char c_line; - cc_t c_cc[NCCS]; - ospeed_t c_ispeed; - ospeed_t c_ospeed; +struct __oldtermios +{ + otcflag_t c_iflag; + otcflag_t c_oflag; + otcflag_t c_cflag; + otcflag_t c_lflag; + char c_line; + cc_t c_cc[NCCS]; + ospeed_t c_ispeed; + ospeed_t c_ospeed; }; -struct termios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - char c_line; - cc_t c_cc[NCCS]; - speed_t c_ispeed; - speed_t c_ospeed; +struct termios +{ + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + char c_line; + cc_t c_cc[NCCS]; + speed_t c_ispeed; + speed_t c_ospeed; }; #ifdef CYGWIN_VERSION_DLL_IS_OLD_TERMIOS @@ -307,8 +309,6 @@ struct termios { #define cfgetospeed(tp) ((tp)->c_ospeed) #define cfgetispeed(tp) ((tp)->c_ispeed) -#define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0) -#define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0) #ifdef __cplusplus extern "C" { @@ -320,6 +320,8 @@ int tcsendbreak (int, int); int tcdrain (int); int tcflush (int, int); int tcflow (int, int); +int cfsetispeed (struct termios *, speed_t); +int cfsetospeed (struct termios *, speed_t); #ifdef __cplusplus } |