Blob Blame History Raw
diff -urNp coreutils-8.20-orig/doc/coreutils.texi coreutils-8.20/doc/coreutils.texi
--- coreutils-8.20-orig/doc/coreutils.texi	2013-02-05 14:32:51.609588591 +0100
+++ coreutils-8.20/doc/coreutils.texi	2013-02-05 14:38:11.486585193 +0100
@@ -13219,6 +13219,13 @@ Disable modem control signals.  May be n
 @cindex flow control, hardware
 @cindex RTS/CTS flow control
 Enable RTS/CTS flow control.  Non-POSIX@.  May be negated.
+
+@item cdtrdsr
+@opindex cdtrdsr
+@cindex hardware flow control
+@cindex flow control, hardware
+@cindex DTR/DSR flow control
+Enable DTR/DSR flow control. Non-POSIX@.  May be negated.
 @end table
 
 
diff -urNp coreutils-8.20-orig/src/stty.c coreutils-8.20/src/stty.c
--- coreutils-8.20-orig/src/stty.c	2013-02-05 14:32:51.579585712 +0100
+++ coreutils-8.20/src/stty.c	2013-02-05 14:33:33.600585688 +0100
@@ -74,6 +74,9 @@
 #ifndef CINTR
 # define CINTR Control ('c')
 #endif
+#ifndef CDTRDSR
+# define CDTRDSR	  004000000000	/* DTR/DSR flow control */
+#endif
 #ifndef CQUIT
 # define CQUIT 28
 #endif
@@ -217,7 +220,7 @@ static struct mode_info const mode_info[
 #ifdef CRTSCTS
   {"crtscts", control, REV, CRTSCTS, 0},
 #endif
-
+  {"cdtrdsr", control, REV, CDTRDSR, 0},
   {"ignbrk", input, SANE_UNSET | REV, IGNBRK, 0},
   {"brkint", input, SANE_SET | REV, BRKINT, 0},
   {"ignpar", input, REV, IGNPAR, 0},
@@ -577,6 +580,7 @@ Control settings:\n\
    [-]clocal     disable modem control signals\n\
    [-]cread      allow input to be received\n\
  * [-]crtscts    enable RTS/CTS handshaking\n\
+ * [-]cdtrdsr    enable DTR/DSR handshaking\n\
    csN           set character size to N bits, N in [5..8]\n\
 "), stdout);
       fputs (_("\
diff -urNp coreutils-8.20-orig/tests/misc/stty.sh coreutils-8.20/tests/misc/stty.sh
--- coreutils-8.20-orig/tests/misc/stty.sh	2012-10-23 16:14:12.000000000 +0200
+++ coreutils-8.20/tests/misc/stty.sh	2013-02-05 14:34:19.980586848 +0100
@@ -52,7 +52,7 @@ for opt in $options; do
   # other serial control settings give the same error. So skip them.
   # Also on ppc*|sparc* glibc platforms 'icanon' gives the same error.
   # See: http://debbugs.gnu.org/7228#14
-  case $opt in parenb|parodd|cstopb|crtscts|icanon) continue;; esac
+  case $opt in parenb|parodd|cstopb|crtscts|icanon|cdtrdsr) continue;; esac
 
   stty $opt || fail=1