Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI-nix
name: CI-nix tcl8

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: Linux CI
name: Linux CI tcl8

# Controls when the action will run.
on:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/linux-ci-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is a basic workflow to help you get started with Actions

name: Linux CI tcl9

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-26.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y tcl9.0-dev

- name: configure
run: |
autoconf
autoreconf -iv
cd unix
../configure --with-tcl=/usr/lib/tcl9.0

- name: make
run: |
cd unix
make

- name: unit tests
run: |
# current time and time-zone:
echo $TZ; timedatectl status
# load local library and execute local test cases:
cd unix
make test

- name: install
run: |
cd unix
sudo make install

- name: runtime test
run: |
echo 'if {[catch {package require tclclockmod; clock format -now} catchResult]} {puts stderr "ERROR! $catchResult"; exit 1} else {puts "OK."}' | tclsh

- name: clean
run: |
cd unix
make clean
22 changes: 14 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dnl to configure the system for the local environment.
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([tclclockmod], [8.6.710])
AC_INIT([tclclockmod],[9.0])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
Expand All @@ -36,13 +36,16 @@ AC_CONFIG_AUX_DIR(tclconfig)
TEA_PATH_TCLCONFIG
TEA_LOAD_TCLCONFIG

if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
Found config for Tcl ${TCL_VERSION}])
fi
if test "${TCL_MINOR_VERSION}" -lt 6 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
if test "${TCL_MAJOR_VERSION}" -eq 8 ; then
if test "${TCL_MINOR_VERSION}" -lt 6 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
Found config for Tcl ${TCL_VERSION}])
fi
else
if test "${TCL_MAJOR_VERSION}" -ne 9 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
Found config for Tcl ${TCL_VERSION}])
fi
fi

#--------------------------------------------------------------------
Expand Down Expand Up @@ -125,6 +128,8 @@ TEA_ADD_SOURCES([generic/tclClock.c \
#TEA_ADD_HEADERS([generic/tclDate.h \
# generic/tclStrIdxTree.h \
# generic/tclClockModInt.h \
# generic/tclUtfInt.h \
# generic/tclSize.h \
#])

#TEA_ADD_STUB_SOURCES([])
Expand Down Expand Up @@ -232,4 +237,5 @@ TEA_PROG_TCLSH
# which require substituting th AC variables in. Include these here.
#--------------------------------------------------------------------

AC_OUTPUT([Makefile pkgIndex.tcl lib/clock.tcl])
AC_CONFIG_FILES([Makefile pkgIndex.tcl lib/clock.tcl])
AC_OUTPUT
11 changes: 6 additions & 5 deletions generic/tclClock.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "tclInt.h"
#include "tclStrIdxTree.h"
#include "tclDate.h"
#include "tclSize.h"

/*
* Windows has mktime. The configurators do not check.
Expand Down Expand Up @@ -1899,7 +1900,7 @@ ConvertLocalToUTC(
{
ClockClientData *dataPtr = clientData;
Tcl_Obj *tzdata; /* Time zone data */
int rowc; /* Number of rows in tzdata */
Tcl_Size rowc; /* Number of rows in tzdata */
Tcl_Obj **rowv; /* Pointers to the rows */
Tcl_WideInt seconds;
ClockLastTZOffs * ltzoc = NULL;
Expand Down Expand Up @@ -2040,7 +2041,7 @@ ConvertLocalToUTCUsingTable(
Tcl_WideInt *rangesVal) /* Return bounds for time period */
{
Tcl_Obj *row;
int cellc;
Tcl_Size cellc;
Tcl_Obj **cellv;
struct {
Tcl_Obj *tzName;
Expand Down Expand Up @@ -2195,7 +2196,7 @@ ConvertUTCToLocal(
{
ClockClientData *dataPtr = clientData;
Tcl_Obj *tzdata; /* Time zone data */
int rowc; /* Number of rows in tzdata */
Tcl_Size rowc; /* Number of rows in tzdata */
Tcl_Obj **rowv; /* Pointers to the rows */
ClockLastTZOffs * ltzoc = NULL;

Expand Down Expand Up @@ -2327,7 +2328,7 @@ ConvertUTCToLocalUsingTable(
Tcl_WideInt *rangesVal) /* Return bounds for time period */
{
Tcl_Obj *row; /* Row containing the current information */
int cellc; /* Count of cells in the row (must be 4) */
Tcl_Size cellc; /* Count of cells in the row (must be 4) */
Tcl_Obj **cellv; /* Pointers to the cells */

/*
Expand Down Expand Up @@ -3671,7 +3672,7 @@ ClockScanObjCmd(

/* set CLC_UNX_ARGS for ::tcl::clock::unixtime command. */
if (1) {
const char *c; int len;
const char *c; Tcl_Size len;
c = Tcl_GetStringFromObj(objv[0], &len);
if (len > 18 && c[14] == 'u') { paflags |= CLC_UNX_ARGS; };
}
Expand Down
Loading
Loading