-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tcl8: add a backport from tcl 9.x that addresses Y2038 issues
Signed-off-by: Alexander Kanavin <[email protected]>
- Loading branch information
Alexander Kanavin
committed
Nov 14, 2024
1 parent
0d3b1c1
commit e4ab84f
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...ipes-devtools/tcltk8/tcl8/0001-generic-tcl.h-use-Tcl_WideInt-for-seconds-in-Tcl_Tim.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From ff508f2e6786df697876140f21855ecb92a3ed36 Mon Sep 17 00:00:00 2001 | ||
From: Alexander Kanavin <[email protected]> | ||
Date: Fri, 18 Aug 2023 12:25:11 +0200 | ||
Subject: [PATCH] generic/tcl.h: use Tcl_WideInt for seconds in Tcl_Time | ||
|
||
This ensures the value will not overflow, particularly on 32 bit systems | ||
in 2038, where long will. | ||
|
||
Upstream-Status: Backport [https://core.tcl-lang.org/tcl/tktview/86dd172271] | ||
Signed-off-by: Alexander Kanavin <[email protected]> | ||
--- | ||
generic/tcl.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/generic/tcl.h b/generic/tcl.h | ||
index 3a4622e..6204c57 100644 | ||
--- a/generic/tcl.h | ||
+++ b/generic/tcl.h | ||
@@ -1418,7 +1418,7 @@ typedef enum { | ||
*/ | ||
|
||
typedef struct Tcl_Time { | ||
- long sec; /* Seconds. */ | ||
+ Tcl_WideInt sec; /* Seconds. */ | ||
long usec; /* Microseconds. */ | ||
} Tcl_Time; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters