Accepting request 1065566 from devel:languages:tcl

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1065566
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tcl?expand=0&rev=68
This commit is contained in:
Dominique Leuenberger 2023-02-16 20:09:48 +00:00 committed by Git OBS Bridge
commit fded67b6c0
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,53 @@
Index: generic/tclInterp.c
==================================================================
--- generic/tclInterp.c
+++ generic/tclInterp.c
@@ -4684,11 +4684,11 @@
case OPT_SEC:
if (Tcl_LimitTypeEnabled(childInterp, TCL_LIMIT_TIME)) {
Tcl_Time limitMoment;
Tcl_LimitGetTime(childInterp, &limitMoment);
- Tcl_SetObjResult(interp, Tcl_NewLongObj(limitMoment.sec));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(limitMoment.sec));
}
break;
}
return TCL_OK;
} else if ((objc-consumedObjc) & 1 /* isOdd(objc-consumedObjc) */) {
@@ -4742,28 +4742,30 @@
"BADVALUE", NULL);
return TCL_ERROR;
}
limitMoment.usec = ((long) tmp)*1000;
break;
- case OPT_SEC:
+ case OPT_SEC: {
+ Tcl_WideInt sec;
secObj = objv[i+1];
(void) Tcl_GetStringFromObj(objv[i+1], &secLen);
if (secLen == 0) {
break;
}
- if (TclGetIntFromObj(interp, objv[i+1], &tmp) != TCL_OK) {
+ if (TclGetWideIntFromObj(interp, objv[i+1], &sec) != TCL_OK) {
return TCL_ERROR;
}
- if (tmp < 0) {
+ if (sec < 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"seconds must be at least 0", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP",
"BADVALUE", NULL);
return TCL_ERROR;
}
- limitMoment.sec = tmp;
+ limitMoment.sec = sec;
break;
+ }
}
}
if (milliObj != NULL || secObj != NULL) {
if (milliObj != NULL) {
/*

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 6 18:29:45 UTC 2023 - Reinhard Max <max@suse.com>
- bsc#1203982, tcl-interp-limit-time.patch: Fix a y2k38 problem
in [interp limit -time] .
-------------------------------------------------------------------
Tue Jan 17 11:21:29 UTC 2023 - Reinhard Max <max@suse.com>

View File

@ -50,6 +50,7 @@ Source2: baselibs.conf
Source3: macros.tcl
Patch0: tcl-refchan-mode-needed.patch
Patch1: tcl-string-compare.patch
Patch2: tcl-interp-limit-time.patch
BuildRequires: autoconf
BuildRequires: pkg-config
BuildRequires: zlib-devel
@ -95,6 +96,7 @@ if ! test -d pkgs/itcl%itclver; then
fi
%patch0
%patch1
%patch2
# The SQLite extension is provided by the sqlite3 package,
# so don't build it here.