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>2004-03-09 05:51:26 +0300
committerChristopher Faylor <me@cgf.cx>2004-03-09 05:51:26 +0300
commit58e9df0f911ab189e12843fda3b04fa5aacf82c2 (patch)
treee02b6a1463fd9714d6a83bee7aa32125436a01e0 /winsup/cygwin
parentd8672e934309be04b2aec7fc22a8467a63b77f68 (diff)
* fhandler_serial.cc (fhandler_serial::ioctl): Implement TIOCSBRK and TIOCCBRK.
* include/sys/termios.h: Define TIOCSBRK and TIOCCBRK.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_serial.cc14
-rw-r--r--winsup/cygwin/include/sys/termios.h2
3 files changed, 22 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 57a04aa4d..3d67914b6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-08 Jaakko Hyvatti <jaakko.hyvatti@iki.fi>
+
+ * fhandler_serial.cc (fhandler_serial::ioctl): Implement TIOCSBRK and
+ TIOCCBRK.
+ * include/sys/termios.h: Define TIOCSBRK and TIOCCBRK.
+
2004-03-08 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (setup_handler): Avoid suspending a thread if it in a
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
index b52befa3d..fa5fef53a 100644
--- a/winsup/cygwin/fhandler_serial.cc
+++ b/winsup/cygwin/fhandler_serial.cc
@@ -476,6 +476,20 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
res = -1;
}
break;
+ case TIOCCBRK:
+ if (ClearCommBreak (get_handle ()) == 0)
+ {
+ __seterrno ();
+ res = -1;
+ }
+ break;
+ case TIOCSBRK:
+ if (SetCommBreak (get_handle ()) == 0)
+ {
+ __seterrno ();
+ res = -1;
+ }
+ break;
case TIOCINQ:
if (ev & CE_FRAME || ev & CE_IOE || ev & CE_OVERRUN || ev & CE_RXOVER
|| ev & CE_RXPARITY)
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h
index 0d381270e..6704454d0 100644
--- a/winsup/cygwin/include/sys/termios.h
+++ b/winsup/cygwin/include/sys/termios.h
@@ -23,6 +23,8 @@ Other UNIX ioctl requests has been omited because
effects of their work one can achive by standard
POSIX commands */
+#define TIOCSBRK 0x5427
+#define TIOCCBRK 0x5428
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004