Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-14
02:29 • Ticket [219032ffff] #!/usr/local/bin/tclsh not working on QNX status still C... artifact: 2f916aad1a user: dgp
2000-10-26
08:34 • Closed ticket [219032ffff]. artifact: a4eefc9467 user: welch
01:09 • New ticket [219032ffff]. artifact: d315005e50 user: nobody

#!/usr/local/bin/tclsh not working on QNX

Closed / Fixed219032ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:09:40
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
welch Closed ticket [219032ffff]. [History diff]2000-10-26 08:34:04
dgp Ticket [219032ffff]: 3 changes [History diff]2001-04-14 02:29:03
Log in (anonymous is fine) to add a comment.