Skip to content

Commit

Permalink
BCK-7474 Update internal version. (#17)
Browse files Browse the repository at this point in the history
* Update internal version.

* Update from gcc-7 to gcc-11 for jammy on linux

* Import changes from pull #16 - silencing gcc-11 warnings.

* Change %x to %p for formatting pointer
  • Loading branch information
resuna committed Apr 24, 2023
1 parent 6572c05 commit 4a4663b
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt-get install -y gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo apt-get install -y gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
sudo apt-get install -y tcl8.6-dev
- name: configure
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TclX is upwardly compatible with Tcl. You take the Extended Tcl package, add it

Extended Tcl runs on most Unix-like systems and Windows.

While this TclX distribution is tested with Tcl 8.4 and Tk 8.4, it should with Tcl 8.3+. Please check the Extended Tcl homepage at
While this TclX distribution is tested with Tcl 8.6 and Tk 8.4, it should work with Tcl 8.3+. Please check the Extended Tcl homepage at

http://tclx.sourceforge.net/

Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
FULL_VERSION="8.6.0"
FULL_VERSION="8.6.1"
# TEA extensions pass this us the version of TEA they think they
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl to configure the system for the local environment.
# RCS: @(#) $Id: configure.in,v 1.17 2006/01/26 00:30:54 hobbs Exp $

AC_INIT([tclx], [8.6])
FULL_VERSION="8.6.0"
FULL_VERSION="8.6.1"

TEA_INIT([3.9])

Expand Down
6 changes: 5 additions & 1 deletion generic/tclXfcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,12 @@ GetFcntlAttr (Tcl_Interp *interp, Tcl_Channel channel, int mode, int attrib)
value = (optValue == TCLX_BUFFERING_LINE);
break;
case ATTR_KEEPALIVE:
if (TclXOSgetsockopt (interp, channel, SO_KEEPALIVE, &value) != TCL_OK)
{
socklen_t len;
if (TclXOSgetsockopt (interp, channel, SO_KEEPALIVE, &len) != TCL_OK)
return TCL_ERROR;
value = len;
}
break;
default:
Tcl_Panic ("bug in fcntl get attrib");
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXhandles.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ TclX_HandleFree (void_pt headerPtr, void_pt entryPtr)

entryHdrPtr = HEADER_AREA (entryPtr);
if (entryHdrPtr->freeLink != ALLOCATED_IDX)
Tcl_Panic ("Tcl_HandleFree: entry not allocated %x\n", entryHdrPtr);
Tcl_Panic ("Tcl_HandleFree: entry not allocated %p\n", entryHdrPtr);

entryHdrPtr->freeLink = tblHdrPtr->freeHeadIdx;
tblHdrPtr->freeHeadIdx =
Expand Down
10 changes: 6 additions & 4 deletions generic/tclXkeylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "tclExtdInt.h"
#include <stdint.h>

/*
* Keyed lists are stored as arrays recursively defined objects. The data
Expand Down Expand Up @@ -338,7 +339,7 @@ DeleteKeyedListEntry (keylIntObj_t *keylIntPtr, int entryIdx)
if (keylIntPtr->hashTbl != NULL) {
Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
int nidx;
intptr_t nidx;

entryPtr = Tcl_FindHashEntry(keylIntPtr->hashTbl,
keylIntPtr->entries [entryIdx].key);
Expand All @@ -354,7 +355,7 @@ DeleteKeyedListEntry (keylIntObj_t *keylIntPtr, int entryIdx)
*/
for (entryPtr = Tcl_FirstHashEntry(keylIntPtr->hashTbl, &search);
entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) {
nidx = (int) Tcl_GetHashValue(entryPtr);
nidx = (intptr_t) Tcl_GetHashValue(entryPtr);
if (nidx > entryIdx) {
Tcl_SetHashValue(entryPtr, (ClientData) (uintptr_t) (nidx - 1));
}
Expand Down Expand Up @@ -394,7 +395,8 @@ FindKeyedListEntry (keylIntObj_t *keylIntPtr,
char **nextSubKeyPtr)
{
char *keySeparPtr;
int keyLen, findIdx = -1;
int keyLen;
intptr_t findIdx = -1;

keySeparPtr = strchr (key, '.');
if (keySeparPtr != NULL) {
Expand All @@ -416,7 +418,7 @@ FindKeyedListEntry (keylIntObj_t *keylIntPtr,
}
entryPtr = Tcl_FindHashEntry(keylIntPtr->hashTbl, key);
if (entryPtr != NULL) {
findIdx = (int) Tcl_GetHashValue(entryPtr);
findIdx = (intptr_t) Tcl_GetHashValue(entryPtr);
}
if (keySeparPtr != NULL) {
key[keyLen] = tmp;
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXsignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ SetSignalState (int signalNum, signalProcPtr_t sigFunc, int restart)
*-----------------------------------------------------------------------------
*/
static int
BlockSignals (Tcl_Interp *interp, int action, unsigned char signals[])
BlockSignals (Tcl_Interp *interp, int action, unsigned char signals[MAXSIG])
{
#ifndef NO_SIGACTION
int signalNum;
Expand Down
6 changes: 4 additions & 2 deletions unix/tclXunixDup.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "tclExtdInt.h"
#include <stdint.h>


/*-----------------------------------------------------------------------------
Expand Down Expand Up @@ -75,7 +76,8 @@ TclXOSDupChannel(Tcl_Interp *interp, Tcl_Channel srcChannel, int mode, char *tar
ClientData handle;
const Tcl_ChannelType *channelType;
Tcl_Channel newChannel = NULL;
int srcFileNum, newFileNum = -1;
intptr_t srcFileNum;
int newFileNum = -1;

/*
* On Unix, the channels we can dup share the same file for the read and
Expand All @@ -86,7 +88,7 @@ TclXOSDupChannel(Tcl_Interp *interp, Tcl_Channel srcChannel, int mode, char *tar
} else {
Tcl_GetChannelHandle (srcChannel, TCL_WRITABLE, &handle);
}
srcFileNum = (int) handle;
srcFileNum = (intptr_t) handle;
channelType = Tcl_GetChannelType (srcChannel);

/*
Expand Down
20 changes: 10 additions & 10 deletions unix/tclXunixId.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,18 @@ IdHost (Tcl_Interp *interp, int objc, Tcl_Obj*CONST objv[])
if (objc != 2)
return TclX_WrongArgs (interp, objv [0], "host");

if (gethostname (hostNameBuf, MAXHOSTNAMELEN) < 0) {
TclX_AppendObjResult (interp, Tcl_PosixError (interp),
(char *) NULL);
return TCL_ERROR;
}
hostNameBuf[MAXHOSTNAMELEN-1] = '\0';
Tcl_SetObjResult (interp, Tcl_NewStringObj (hostNameBuf, -1));
return TCL_OK;
if (gethostname (hostNameBuf, MAXHOSTNAMELEN) < 0) {
TclX_AppendObjResult (interp, Tcl_PosixError (interp),
(char *) NULL);
return TCL_ERROR;
}
hostNameBuf[MAXHOSTNAMELEN-1] = '\0';
Tcl_SetObjResult (interp, Tcl_NewStringObj (hostNameBuf, -1));
return TCL_OK;
#else
TclX_AppendObjResult (interp, "host name unavailable on this system ",
TclX_AppendObjResult (interp, "host name unavailable on this system ",
"(no gethostname function)", (char *) NULL);
return TCL_ERROR;
return TCL_ERROR;
#endif
}

Expand Down
12 changes: 7 additions & 5 deletions unix/tclXunixOS.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include "tclExtdInt.h"
#include <stdint.h>

#ifndef NO_GETPRIORITY
#include <sys/resource.h>
Expand Down Expand Up @@ -113,7 +114,7 @@ ChannelToFnum (Tcl_Channel channel, int direction)
return -1;
}
}
return (int) handle;
return (intptr_t) handle;
}

/*-----------------------------------------------------------------------------
Expand Down Expand Up @@ -401,7 +402,7 @@ TclXOSsystem (Tcl_Interp *interp, char *command, int *exitCode)
if (pid == 0) {
close (errPipes [0]);
execl ("/bin/sh", "sh", "-c", command, (char *) NULL);
write (errPipes [1], &errno, sizeof (errno));
if (write (errPipes [1], &errno, sizeof (errno))) {}
_exit (127);
}

Expand Down Expand Up @@ -918,8 +919,9 @@ TclXOSgetpeername (Tcl_Interp *interp, Tcl_Channel channel, void *sockaddr, sock
int
TclXOSgetsockname (Tcl_Interp *interp, Tcl_Channel channel, void *sockaddr, int sockaddrSize)
{
socklen_t siz = sockaddrSize;
if (getsockname (ChannelToFnum (channel, 0),
(struct sockaddr *) sockaddr, &sockaddrSize) < 0) {
(struct sockaddr *) sockaddr, &siz) < 0) {
TclX_AppendObjResult (interp, Tcl_GetChannelName (channel), ": ",
Tcl_PosixError (interp), (char *) NULL);
return TCL_ERROR;
Expand All @@ -943,7 +945,7 @@ TclXOSgetsockname (Tcl_Interp *interp, Tcl_Channel channel, void *sockaddr, int
int
TclXOSgetsockopt (Tcl_Interp *interp, Tcl_Channel channel, int option, socklen_t *valuePtr)
{
int valueLen = sizeof (*valuePtr);
socklen_t valueLen = sizeof (*valuePtr);

if (getsockopt (ChannelToFnum (channel, 0), SOL_SOCKET, option,
(void*) valuePtr, &valueLen) != 0) {
Expand Down Expand Up @@ -1385,7 +1387,7 @@ TclXOSGetSelectFnum (Tcl_Interp *interp, Tcl_Channel channel, int direction, int
(char *) NULL);
return TCL_ERROR;
}
*fnumPtr = (int) handle;
*fnumPtr = (intptr_t) handle;
return TCL_OK;
}

Expand Down

0 comments on commit 4a4663b

Please sign in to comment.