Menu

#2820 minor bug in threading code

obsolete: 8.4.7
closed-fixed
5
2004-10-28
2004-07-31
Anonymous
No

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.

Discussion

  • Zoran Vasiljevic

    • assigned_to: andreas_kupries --> kennykb
     
  • Zoran Vasiljevic

    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 <kennykb@acm.org>

    * 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.

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-10-28
    • status: open --> closed-fixed
     
  • Kevin B KENNY

    Kevin B KENNY - 2004-10-28

    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.

     
  • Don Porter

    Don Porter - 2004-10-28
    • assigned_to: kennykb --> dgp
     
  • Don Porter

    Don Porter - 2004-10-28

    Logged In: YES
    user_id=80530

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

     
  • Don Porter

    Don Porter - 2004-10-28
    • assigned_to: dgp --> kennykb
     
  • Don Porter

    Don Porter - 2004-10-28

    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.

     
MongoDB Logo MongoDB