Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d315005e50589b7e6da858d306c6ff9c6485ce2a
Ticket: 219032ffffffffffffffffffffffffffffffffff
#!/usr/local/bin/tclsh not working on QNX
User & Date: nobody on 2000-10-26 01:09:40
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 4053 Bug
    Version: 8.2.3
    SubmitDate: '2000-01-20'
    LastModified: '2000-01-25'
    Severity: LOW
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Other
    OSVersion: QNX 4.25
    Machine: intel pII
    FixedDate: '2000-01-25'
    FixedInVersion: 8.3
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Bruce Edge
    
    
    Comments:
    
    This fixes the problem. Would it be possible to put it into the next release?
    
    
    ReproducibleScript:
    
    #!/usr/local/bin/tclsh
    
    
    ObservedBehavior:
    
    # //8/usr/local/tcl/bin> ls -l itclpp_parse
    
    -rwxrwxr-x  1 root      root          32545 Jan 24 05:45 itclpp_parse
    
    
    # //8/usr/local/tcl/bin> ./itclpp_parse
    
    couldn't read file "//8/usr/local/tcl/bin/itclpp_parse": no such file or
    
    directory
    
    
    # //8/usr/local/tcl/bin> head -2 itclpp_parse
    
    #! /usr/local/bin/tclsh
    
    
    # //8/usr/local/tcl/bin> pwd
    
    /usr/local/tcl/bin
    
    
    It apparently has problems with QNX's node ID prefix to it's path, eg: the //8
    
    preceeding the path.
    
    
    DesiredBehavior:
    
    tclsh should be invoked to run the script containing the #!/usr/local/bin/tclsh line
    
    
    Patch:
    
    //8/usr/local/src/tcl8.2.3> diff generic/tclFileName.orig.c  generic/tclFileNam
    
    755,756c755,761
    
    <
    
    <               if (*p == '/') {
    
    ---
    
    > #ifdef __QNX__
    
    >     // Check for QNX //<node id> prefix
    
    >     if ((p[0] == '/') && (p[1] == '/') && atoi(&p[2]) ) {
    
    >       p += 3;
    
    >     }
    
    > #endif
    
    >     if (*p == '/') {
    
    # //8/usr/local/src/tcl8.2.3>
    
    
    PatchFiles:
    
    generic/tclFileName.c
    
    
    
    
    Slightly modified to the following for 8.3.0:
    
    
    
    pop [~/cvs/tcl8.3] 5 % cvs diff -c generic/tclFileName.c
    
    Index: generic/tclFileName.c
    
    ===================================================================
    
    RCS file: /home/cvs/external/tcl/generic/tclFileName.c,v
    
    retrieving revision 1.9
    
    diff -c -r1.9 tclFileName.c
    
    *** tclFileName.c       2000/01/24 02:29:58     1.9
    
    --- tclFileName.c       2000/01/26 01:01:42
    
    ***************
    
    *** 762,767 ****
    
    --- 762,776 ----
    
                     * beginning of the path.
    
                     */
    
      
    
    + #ifdef __QNX__
    
    +               /*
    
    +                * Check for QNX //<node id> prefix
    
    +                */
    
    +               if (*p && (strlen(p) > 3) &&
    
    +                       (p[0] == '/') && (p[1] == '/') && atoi(&p[2])) {
    
    +                   p += 3;
    
    +               }
    
    + #endif
    
                    if (*p == '/') {
    
                        Tcl_DStringSetLength(resultPtr, oldLength);
    
                        Tcl_DStringAppend(resultPtr, "/", 1);
    
     
    
    -- 01/25/2000 hobbs
    
  4. foundin changed to: "final: 8.2.3"
  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: "37. File System"
  10. title changed to: "#!/usr/local/bin/tclsh not working on QNX"
  11. type changed to: "Bug"