Tcl Source Code

View Ticket
Login
Ticket UUID: 589526
Title: missing stubs for tclUnixThrd.c procs
Type: Bug Version: obsolete: 8.4b1
Submitter: das Created on: 2002-08-01 08:03:25
Subsystem: 49. Threading Assigned To: das
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2002-08-06 08:50:25
Resolution: Fixed Closed By: das
    Closed on: 2002-08-06 01:50:25
Description:
Any stubbed & threaded extension that includes 
tclUnixPort.h and uses any of the procs readdir, localtime, 
gmtime or inet_ntoa will fail with link errors on Unix with the 
current Tcl HEAD. (ex: current threaded TclX 8.4 HEAD fails 
to link)

This is due to the following defines in tclUnixPort.h:
    #define readdir(x)TclpReaddir(x)
    #define localtime(x)TclpLocaltime(x)
    #define gmtime(x)TclpGmtime(x)
    #define inet_ntoa(x)TclpInetNtoa(x)
and the fact that those four Tclp* procs are not exported in 
stubs.

either these four defines need to be restricted to be 
internal to Tcl or the four Tclp* procs need to be added to 
tclInt.decls as in the attached patch.

both threaded and non-threaded Tcl as well as associated 
threaded & non-threaded TclX 8.4 build fine with the patch.

This should go into b2 if possible as it potentially breaks 
any threaded stubbed extension.
User Comments: das added on 2002-08-06 08:50:25:

File Deleted - 28235: 



File Added - 28483: threadstubs2.patch

Logged In: YES 
user_id=90580

reuploaded the patch for future reference and checked it in.

hobbs added on 2002-08-05 05:14:33:
Logged In: YES 
user_id=72656

Please reupload this patch - it got truncated.  Or better yet, it 
looked good for the parts that were there, so just apply it.

das added on 2002-08-02 13:12:26:

File Deleted - 28182: 



File Added - 28235: threadstubs1.patch

Logged In: YES 
user_id=90580

attached improved patch that - in a non-threaded build - calls 
through to e.g. gmtime from TclpGmtime instead of returning 
NULL.

das added on 2002-08-01 15:03:26:

File Added - 28182: threadstubs.patch

Attachments: