Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-02-28 04:31:04 +0300
committerChristopher Faylor <me@cgf.cx>2006-02-28 04:31:04 +0300
commit6a7a2f4bbe6f231892df398f40c6293546e7c0c2 (patch)
treed0846ba4aca1e0a625868dd930142c2927a1b1c0
parentf6f3b1ee4634682c8415e4d2515513c68b54d260 (diff)
* include/sys/termios.h (cfsetispeed): Just define as a function rather than
resorting to a macro. (cfsetospeed): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/include/sys/termios.h44
2 files changed, 29 insertions, 21 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 326205d29..e4193da18 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2006-02-27 Christopher Faylor <cgf@timesys.com>
+ * include/sys/termios.h (cfsetispeed): Just define as a function rather
+ than resorting to a macro.
+ (cfsetospeed): Ditto.
+
+2006-02-27 Christopher Faylor <cgf@timesys.com>
+
* sigproc.cc: Fix a comment.
2006-02-27 Christopher Faylor <cgf@timesys.com>
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
}