Tcl Source Code

View Ticket
Login
Ticket UUID: 1001319
Title: minor bug in threading code
Type: Bug Created on: 2004-07-31 22:47:07
Submitter: nobody Assigned to: kennykb
Subsystem: 49. Threading Severity:
Priority: 5 Medium Last modified: 2004-10-29 00:11:50
Status: Closed Closed by: kennykb
Resolution: Fixed Closed on: 2004-10-28 16:13:11
Version: obsolete: 8.4.7
Description:
When compiling tcl 8.4.7 on IRIX 5.3 with --enable-threads one ends up with
cfe: Error: ./../generic/../unix/tclUnixPort.h, line 568: redeclaration of 'TclpLocaltime'; previous declaration at line 515 in file './../generic/tclIntDecls.h'
 extern     struct tm *         TclpLocaltime(const  TclpTime_t);
 ---------------------------    ^
cfe: Error: ./../generic/../unix/tclUnixPort.h, line 568: Incompatible type for the function parameter
 extern     struct tm *         TclpLocaltime(const  TclpTime_t);
 ---------------------------    --------------^
cfe: Error: ./../generic/../unix/tclUnixPort.h, line 571: redeclaration of 'TclpGmtime'; previous declaration at line 517 in file './../generic/tclIntDecls.h'
 extern     struct tm *         TclpGmtime(const  TclpTime_t);
 ---------------------------    ^
cfe: Error: ./../generic/../unix/tclUnixPort.h, line 571: Incompatible type for the function parameter
 extern     struct tm *         TclpGmtime(const  TclpTime_t);
 ---------------------------    -----------^
*** Error code 1 (bu21)

The reason is that TclpLocaltime and TclpGmtime are defined with a const argument at one point and without one at another.
User Comments:
vasiljevic added on 2004-10-20 16:21:15:
Logged In: YES 
user_id=95086

I have looked around and according to ChangeLog 
file, those have been modified by: 
 
2004-05-14  Kevin B. Kenny  <[email protected]> 
 
        * generic/tclInt.decls:      Promoted TclpLocaltime and TclpGmtime 
        * generic/tclIntDecls.h:     from Unix-specific stubs to the generic 
        * generic/tclIntPlatDecls.h: internal Stubs table.  Reran 'genstubs' 
        * generic/tclStubInit.c: 
        * unix/tclUnixPort.h: 
 
So, I suggest, Kevin should take care of that. My first thought 
was to simple remove the CONST qualifier from the prototype 
declaraion in unix/tclUnixPort.h but I'm not sure if this is the 
right way.

kennykb added on 2004-10-28 23:13:11:
Logged In: YES 
user_id=99768

Hmm, never met a compiler that pedantic before.

The param should be CONST throughout.

Can someone check this out on Irix? The 8.4 branch tip
appears to be ok on Linux, Solaris and Windows, but
I haven't an Irix to test it.

dgp added on 2004-10-28 23:28:15:
Logged In: YES 
user_id=80530

I'll see what I can do about an Irix test.

dgp added on 2004-10-29 00:11:50:
Logged In: YES 
user_id=80530


Tcl 8.4.8 in a --enable-threads
configuration builds fine on an
IRIX64 6.5 system I have access to.

`make test` shows only one
failed test, clock-41.1.
Apparently IRIX does not support the %k format.