Overview
| Artifact ID: | 12308a95d40ed049700adae1018372d5bb07a440735e2bb0ab7fdd2d7d662bb3 |
|---|---|
| Ticket: | d40b9c8503eb4deeaeb01352b2d0937f77624e49
Enforcing 64-bit time_t? |
| User & Date: | chrstphrchvz on 2023-03-08 09:38:00 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- 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)?
- foundin changed to: "trunk"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "52. Portability Support"
- title changed to: "Enforcing 64-bit time_t?"
- type changed to: "RFE"