This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin/cygwin-2.0] Add CMIN and CTIME definitions


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=03d5584c4bd296872f4c1dd3fa930ecdffc581a6

commit 03d5584c4bd296872f4c1dd3fa930ecdffc581a6
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Mar 25 17:21:38 2015 +0100

    Add CMIN and CTIME definitions
    
    	* include/sys/termios.h: Add CMIN and CTIME.
    	* fhandler_termios.cc (fhandler_termios::tcinit): Use CMIN and CTIME.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog             | 5 +++++
 winsup/cygwin/fhandler_termios.cc   | 6 +++---
 winsup/cygwin/include/sys/termios.h | 4 +++-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1ba89c6..00f8d84 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-25  Corinna Vinschen  <corinna@vinschen.de>
+
+	* include/sys/termios.h: Add CMIN and CTIME.
+	* fhandler_termios.cc (fhandler_termios::tcinit): Use CMIN and CTIME.
+
 2015-03-25  Takashi Yano  <takashi.yano@nifty.ne.jp>
 
 	* tty.h (class tty_min): Remove variable "write_error" to which any
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 99b661e..983e2f9 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -1,7 +1,7 @@
 /* fhandler_termios.cc
 
    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010,
-   2011, 2012, 2014 Red Hat, Inc.
+   2011, 2012, 2014, 2015 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -46,14 +46,14 @@ fhandler_termios::tcinit (bool is_pty_master)
       tc ()->ti.c_cc[VINTR]	= CINTR;
       tc ()->ti.c_cc[VKILL]	= CKILL;
       tc ()->ti.c_cc[VLNEXT]	= CLNEXT;
-      tc ()->ti.c_cc[VMIN]	= 1;
+      tc ()->ti.c_cc[VMIN]	= CMIN;
       tc ()->ti.c_cc[VQUIT]	= CQUIT;
       tc ()->ti.c_cc[VREPRINT]	= CRPRNT;
       tc ()->ti.c_cc[VSTART]	= CSTART;
       tc ()->ti.c_cc[VSTOP]	= CSTOP;
       tc ()->ti.c_cc[VSUSP]	= CSUSP;
       tc ()->ti.c_cc[VSWTC]	= CSWTCH;
-      tc ()->ti.c_cc[VTIME]	= 0;
+      tc ()->ti.c_cc[VTIME]	= CTIME;
       tc ()->ti.c_cc[VWERASE]	= CWERASE;
 
       tc ()->ti.c_ispeed = tc ()->ti.c_ospeed = B38400;
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h
index 687c008..fb6f385 100644
--- a/winsup/cygwin/include/sys/termios.h
+++ b/winsup/cygwin/include/sys/termios.h
@@ -1,7 +1,7 @@
 /* sys/termios.h
 
    Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+   2008, 2009, 2010, 2011, 2012, 2015 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -99,6 +99,8 @@ POSIX commands */
 #define CDISCARD	CFLUSH
 #define CWERASE	CTRL('W')
 #define CLNEXT	CTRL('V')
+#define CMIN	1
+#define CTIME	0
 
 /* iflag bits */
 #define IGNBRK	0x00001


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]