From 8afe78c467004b7013109efef04cb237a506aaa2 Mon Sep 17 00:00:00 2001 From: cgf Date: Fri, 12 Sep 2008 22:32:07 +0000 Subject: [PATCH] * Makefile.in: Add -c option which is now removed from COMPILE_C*. * cygwin.din (cfmakeraw): Export. * termios.cc (cfmakeraw): Implement. * include/sys/termios.h (cfmakeraw): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/Makefile.in | 4 ++-- winsup/cygwin/cygwin.din | 1 + winsup/cygwin/include/cygwin/version.h | 3 ++- winsup/cygwin/include/sys/termios.h | 1 + winsup/cygwin/termios.cc | 11 +++++++++++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5b22e70854..8f0897f9a8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2008-09-12 Christopher Faylor + + * Makefile.in: Add -c option which is now removed from COMPILE_C*. + * cygwin.din (cfmakeraw): Export. + * termios.cc (cfmakeraw): Implement. + * include/sys/termios.h (cfmakeraw): Declare. + * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. + 2008-09-11 Christopher Faylor * cygwin.din (sys_sigabbrev): Add this here. diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index e9b96629cd..d6f6bb1ce5 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -451,7 +451,7 @@ lib%.a: %.o winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES) @echo "Making version.o and winver.o";\ $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) && \ - $(COMPILE_CXX) -o version.o version.cc && \ + $(COMPILE_CXX) -c -o version.o version.cc && \ touch $@ Makefile: cygwin.din @@ -460,7 +460,7 @@ $(DEF_FILE): gendef cygwin.din $(srcdir)/tlsoffsets.h $^ $@ sigfe.s $(srcdir)/tlsoffsets.h: gentls_offsets cygtls.h - $^ $@ $(COMPILE_CXX) + $^ $@ $(COMPILE_CXX) -c sigfe.s: $(DEF_FILE) @[ -s $@ ] || \ diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index edd8442e2e..3aeee879ad 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -174,6 +174,7 @@ ceilf NOSIGFE _ceilf = ceilf NOSIGFE cfgetispeed NOSIGFE cfgetospeed NOSIGFE +cfmakeraw NOSIGFE cfsetispeed SIGFE cfsetospeed SIGFE chdir SIGFE diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 23836a537a..268f99db71 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -334,12 +334,13 @@ details. */ 185: Export futimens, utimensat. 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface which provided its own user_data structure. + 187: Export cfmakeraw. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 186 +#define CYGWIN_VERSION_API_MINOR 187 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h index 0571469668..6648bc3693 100644 --- a/winsup/cygwin/include/sys/termios.h +++ b/winsup/cygwin/include/sys/termios.h @@ -330,6 +330,7 @@ int tcsendbreak (int, int); int tcdrain (int); int tcflush (int, int); int tcflow (int, int); +void cfmakeraw (struct termios *); int cfsetispeed (struct termios *, speed_t); int cfsetospeed (struct termios *, speed_t); diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc index fe6a1de3c5..4476be17de 100644 --- a/winsup/cygwin/termios.cc +++ b/winsup/cygwin/termios.cc @@ -311,3 +311,14 @@ cfsetispeed (struct termios *in_tp, speed_t speed) __toapp_termios (in_tp, tp); return res; } + +extern "C" void +cfmakeraw(struct termios *tp) +{ + tp->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP + | INLCR | IGNCR | ICRNL | IXON); + tp->c_oflag &= ~OPOST; + tp->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); + tp->c_cflag &= ~(CSIZE | PARENB); + tp->c_cflag |= CS8; +} -- 2.11.0