Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 12308a95d40ed049700adae1018372d5bb07a440735e2bb0ab7fdd2d7d662bb3
Ticket: d40b9c8503eb4deeaeb01352b2d0937f77624e49
Enforcing 64-bit time_t?
User & Date: chrstphrchvz on 2023-03-08 09:38:00
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    To what extent does/should Tcl 9.0 assume/require/enforce 64-bit <tt>time_t</tt>?
    
    Currently, when I build Tcl 9.0 on ia32 (32-bit x86) Linux, it uses 32-bit <tt>time_t</tt>, but the tests cmdAH-24.20.1 and cmdAH-24.20.2 fail (rather than skip as with 8.7; timestamp 3155760000 overflows to -1139207296). I can also reproduce the issue in [fa128568a597]. (Maybe the same would happen for 32-bit ARM.)
    
    I read elsewhere that glibc 2.34 and Linux kernel 5.6 support 64-bit <tt>time_t</tt> on 32-bit systems by compiling with <tt>_FILE_OFFSET_SIZE=64</tt> and <tt>_TIME_BITS=64</tt> defined, and that future glibc may even define these by default. I tried building Tcl 9.0 again with these defined, and confirmed that doing so avoids the overflow issues. This approach reportedly supersedes/conflicts with the approach of defining <tt>_LARGEFILE64_SOURCE</tt>, as proposed in the bug-02b58d5d04 branch. Would it be appropriate for Tcl/Tk to instead define <tt>_FILE_OFFSET_SIZE=64</tt> and <tt>_TIME_BITS=64</tt> by default (possibly before package managers all begin separately trying to do so themselves)?
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "chrstphrchvz"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "chrstphrchvz"
  14. subsystem changed to: "52. Portability Support"
  15. title changed to: "Enforcing 64-bit time_t?"
  16. type changed to: "RFE"