Tcl Source Code

Artifact [0dd612d36d]
Login

Artifact 0dd612d36d1fdb87997d0adda7b029d5219b2954:

Attachment "None" to ticket [402923ffff] added by rmax 2000-12-19 21:40:16.
--- unix/tcl.m4
+++ unix/tcl.m4 2000/12/19 12:54:40
@@ -1219,11 +1219,12 @@
 
     AC_TRY_RUN([
 #include <termios.h>
+#include <errno.h>
 
 main()
 {
     struct termios t;
-    if (tcgetattr(0, &t) == 0) {
+    if (tcgetattr(0, &t) == 0 || errno == ENOTTY) {
        cfsetospeed(&t, 0);
        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
        return 0;
@@ -1236,11 +1237,12 @@
     else
        AC_TRY_RUN([
 #include <termio.h>
+#include <errno.h>
 
 main()
 {
     struct termio t;
-    if (ioctl(0, TCGETA, &t) == 0) {
+    if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY) {
        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
        return 0;
     }
@@ -1252,11 +1254,12 @@
     else
        AC_TRY_RUN([
 #include <sgtty.h>
+#include <errno.h>
 
 main()
 {
     struct sgttyb t;
-    if (ioctl(0, TIOCGETP, &t) == 0) {
+    if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY) {
        t.sg_ospeed = 0;
        t.sg_flags |= ODDP | EVENP | RAW;
        return 0;