Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 43c7466ca94e5c3efa99d1f77111d5cc944990b8
Ticket: 219405ffffffffffffffffffffffffffffffffff
detection of the system's tty API is bad.
User & Date: nobody on 2000-10-26 05:12:31
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 6316 Bug
    Version: 8.3.1
    SubmitDate: '2000-09-27'
    LastModified: '2000-10-25'
    Severity: LOW
    Status: UnAssn
    Submitter: techsupp
    OS: Linux-SuSE
    OSVersion: 7.0
    Machine: PII/400
    FixedDate: '2000-10-25'
    ClosedDate: '2000-10-25'
    
    
    Name:
    Reinhard Max
    
    Comments:
    I assume that it is sufficient to look, if the respective header files
        exist instead of testing, if the APIs actually work at configuration
        time. This seems to be right for Linux, but I don't know if it is also
        true for other systems.
    
    ReproducibleScript:
    unix $ ./configure
    [...]
    checking termios vs. termio vs. sgtty... termios
    [...]
    unix $./configure </dev/null
    [...]
    checking termios vs. termio vs. sgtty... none
    [...]
    
    ObservedBehavior:
    When unix/configure is called with stdin not being a tty the test wheather termios, termio or sgtty is availible fails and the "-mode" option to "fconfigure" isn't compiled in.
    
    DesiredBehavior:
    unix $ ./configure </dev/null
    [...]
    checking termios vs. termio vs. sgtty... termios
    [...]
    
    Patch:
    --- unix/tcl.m4
    +++ unix/tcl.m4 2000/09/13 09:53:43
    @@ -1215,60 +1215,23 @@
     #--------------------------------------------------------------------
    
     AC_DEFUN(SC_SERIAL_PORT, [
    -    AC_MSG_CHECKING([termios vs. termio vs. sgtty])
    
    -    AC_TRY_RUN([
    -#include <termios.h>
    -
    -main()
    -{
    -    struct termios t;
    -    if (tcgetattr(0, &t) == 0) {
    -       cfsetospeed(&t, 0);
    -       t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
    -       return 0;
    -    }
    -    return 1;
    -}], tk_ok=termios, tk_ok=no, tk_ok=no)
    +    AC_CHECK_HEADER(termios.h, tk_ok=termios, tk_ok=no)
    
         if test $tk_ok = termios; then
            AC_DEFINE(USE_TERMIOS)
         else
    -       AC_TRY_RUN([
    -#include <termio.h>
    -
    -main()
    -{
    -    struct termio t;
    -    if (ioctl(0, TCGETA, &t) == 0) {
    -       t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
    -       return 0;
    -    }
    -    return 1;
    -    }], tk_ok=termio, tk_ok=no, tk_ok=no)
    +       AC_CHECK_HEADER(termio.h, tk_ok=termio, tk_ok=no)
    
         if test $tk_ok = termio; then
            AC_DEFINE(USE_TERMIO)
         else
    -       AC_TRY_RUN([
    -#include <sgtty.h>
    -
    -main()
    -{
    -    struct sgttyb t;
    -    if (ioctl(0, TIOCGETP, &t) == 0) {
    -       t.sg_ospeed = 0;
    -       t.sg_flags |= ODDP | EVENP | RAW;
    -       return 0;
    -    }
    -    return 1;
    -}], tk_ok=sgtty, tk_ok=none, tk_ok=none)
    +       AC_CHECK_HEADER(sgtty.h, tk_ok=sgtty, tk_ok=none)
         if test $tk_ok = sgtty; then
            AC_DEFINE(USE_SGTTY)
         fi
         fi
         fi
    -    AC_MSG_RESULT($tk_ok)
     ])
    
    PatchFiles:
    unix/tcl.m4
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.3.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "detection of the system's tty API is bad."
  11. type changed to: "Bug"