summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-24 08:29:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-24 08:29:25 (GMT)
commit810eeec19d827e3162bea26dc073c0ca99819f77 (patch)
treedb221ff6ab0f0d1433839ee1e0bb841a67585920
parent737c82426ba6e59611fc92d8fb623e3a181d3258 (diff)
parentbb0e258bba9de0be9568baf642416f1db0b0f797 (diff)
downloadtcl-810eeec19d827e3162bea26dc073c0ca99819f77.zip
tcl-810eeec19d827e3162bea26dc073c0ca99819f77.tar.gz
tcl-810eeec19d827e3162bea26dc073c0ca99819f77.tar.bz2
Merge 8.7
-rw-r--r--.travis.yml113
-rw-r--r--generic/tclBasic.c10
-rw-r--r--generic/tclLiteral.c4
-rw-r--r--generic/tclOODefineCmds.c6
-rw-r--r--generic/tclOOInfo.c12
-rw-r--r--generic/tclPkg.c6
-rw-r--r--generic/tclProc.c4
-rw-r--r--generic/tclStringObj.c56
-rw-r--r--generic/tclTestProcBodyObj.c8
-rw-r--r--win/cat.c2
10 files changed, 144 insertions, 77 deletions
diff --git a/.travis.yml b/.travis.yml
index e14f084..45473fd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,19 +4,6 @@ language: c
matrix:
include:
# Testing on Linux with various compilers
- - name: "Linux/Clang/Shared"
- os: linux
- dist: xenial
- compiler: clang
- env:
- - BUILD_DIR=unix
- - name: "Linux/Clang/Static"
- os: linux
- dist: xenial
- compiler: clang
- env:
- - CFGOPT=--disable-shared
- - BUILD_DIR=unix
- name: "Linux/Clang/Shared: UTF_MAX=6"
os: linux
dist: xenial
@@ -66,6 +53,16 @@ matrix:
env:
- BUILD_DIR=unix
- CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
+# Debug build. Running test-cases disabled, because it is currently failing.
+ - name: "Linux/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: gcc
+ env:
+ - BUILD_DIR=unix
+ - CFGOPT=--enable-symbols=all
+ script:
+ - make all tcltest
# Older versions of GCC...
- name: "Linux/GCC 7/Shared"
os: linux
@@ -115,13 +112,37 @@ matrix:
- g++-4.9
env:
- BUILD_DIR=unix
+# Clang
+ - name: "Linux/Clang/Shared"
+ os: linux
+ dist: xenial
+ compiler: clang
+ env:
+ - BUILD_DIR=unix
+ - name: "Linux/Clang/Static"
+ os: linux
+ dist: xenial
+ compiler: clang
+ env:
+ - CFGOPT=--disable-shared
+ - BUILD_DIR=unix
+# Debug build. Running test-cases disabled, because it is currently failing.
+ - name: "Linux/Clang/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: clang
+ env:
+ - BUILD_DIR=unix
+ - CFGOPT=--enable-symbols=all
+ script:
+ - make all tcltest
# Testing on Mac, various styles
- name: "macOS/Xcode 11/Shared/Unix-like"
os: osx
osx_image: xcode11
env:
- BUILD_DIR=unix
- - name: "macOS/Xcode 11/Shared/Mac-like"
+ - name: "macOS/Xcode 11/Shared"
os: osx
osx_image: xcode11
env:
@@ -131,21 +152,21 @@ matrix:
- make all
# The styles=develop avoids some weird problems on OSX
- make test styles=develop
- - name: "macOS/Xcode 10/Shared/Mac-like"
+ - name: "macOS/Xcode 10/Shared"
os: osx
osx_image: xcode10.2
env:
- BUILD_DIR=macosx
install: []
script: *mactest
- - name: "macOS/Xcode 9/Shared/Mac-like"
+ - name: "macOS/Xcode 9/Shared"
os: osx
osx_image: xcode9
env:
- BUILD_DIR=macosx
install: []
script: *mactest
- - name: "macOS/Xcode 8/Shared/Mac-like"
+ - name: "macOS/Xcode 8/Shared"
os: osx
osx_image: xcode8
env:
@@ -153,7 +174,7 @@ matrix:
install: []
script: *mactest
# Test with mingw-w64 (32 bit) cross-compile
-# Doesn't run tests because wine is only an imperfect Windows emulation
+# Doesn't run tests because wine is only an imperfect Windows emulation
- name: "Linux-cross-Windows-32/GCC/Shared/no test"
os: linux
dist: xenial
@@ -171,8 +192,7 @@ matrix:
- BUILD_DIR=win
- CFGOPT=--host=i686-w64-mingw32
script: &crosstest
- - make all
- - make tcltest
+ - make all tcltest
# Include a high visibility marker that tests are skipped outright
- >
echo "`tput setaf 3`SKIPPED TEST: CROSS COMPILING`tput sgr0`"
@@ -203,8 +223,17 @@ matrix:
- BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=3"
script: *crosstest
+ - name: "Linux-cross-Windows-32/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: i686-w64-mingw32-gcc
+ addons: *mingw32
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--host=i686-w64-mingw32 --enable-symbols"
+ script: *crosstest
# Test with mingw-w64 (64 bit)
-# Doesn't run tests because wine is only an imperfect Windows emulation
+# Doesn't run tests because wine is only an imperfect Windows emulation
- name: "Linux-cross-Windows-64/GCC/Shared/no test"
os: linux
dist: xenial
@@ -248,6 +277,45 @@ matrix:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: x86_64-w64-mingw32-gcc
+ addons: *mingw64
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit --enable-symbols"
+ script: *crosstest
+# Test on Windows with MSVC native
+# Doesn't run tests because not all tests work in this environment. TODO: either fix or disable those test-cases!
+ - name: "Windows/MSVC/Shared/no test"
+ os: windows
+ compiler: cl
+ env: &vcenv
+ - BUILD_DIR=win
+ - VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"
+ before_install: &vcpreinst
+ - PATH="$PATH:$VCDIR"
+ - cd ${BUILD_DIR}
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc all tcltest'
+ - name: "Windows/MSVC/Static/no test"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc all tcltest'
+ - name: "Windows/MSVC/Debug/no test"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc all tcltest'
before_install:
- cd ${BUILD_DIR}
install:
@@ -255,6 +323,5 @@ install:
before_script:
- export ERROR_ON_FAILURES=1
script:
- - make all
- - make tcltest
+ - make all tcltest
- make test
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d35fa47..867acca 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -2586,7 +2586,7 @@ TclCreateObjCommandInNs(
Tcl_Interp *interp,
const char *cmdName, /* Name of command, without any namespace
* components. */
- Tcl_Namespace *namespace, /* The namespace to create the command in */
+ Tcl_Namespace *namesp, /* The namespace to create the command in */
Tcl_ObjCmdProc *proc, /* Object-based function to associate with
* name. */
ClientData clientData, /* Arbitrary value to pass to object
@@ -2600,7 +2600,7 @@ TclCreateObjCommandInNs(
ImportRef *oldRefPtr = NULL;
ImportedCmdData *dataPtr;
Tcl_HashEntry *hPtr;
- Namespace *nsPtr = (Namespace *) namespace;
+ Namespace *nsPtr = (Namespace *) namesp;
/*
* If the command name we seek to create already exists, we need to delete
@@ -5452,7 +5452,7 @@ TclArgumentEnter(
CmdFrame *cfPtr)
{
Interp *iPtr = (Interp *) interp;
- int new, i;
+ int isNew, i;
Tcl_HashEntry *hPtr;
CFWord *cfwPtr;
@@ -5468,8 +5468,8 @@ TclArgumentEnter(
if (cfPtr->line[i] < 0) {
continue;
}
- hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, objv[i], &new);
- if (new) {
+ hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, objv[i], &isNew);
+ if (isNew) {
/*
* The word is not on the stack yet, remember the current location
* and initialize references.
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 3fcbc94..0e322b3 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -407,7 +407,7 @@ TclRegisterLiteral(
LiteralEntry *globalPtr, *localPtr;
Tcl_Obj *objPtr;
size_t hash, localHash, objIndex;
- int new;
+ int isNew;
Namespace *nsPtr;
if (length == TCL_AUTO_LENGTH) {
@@ -461,7 +461,7 @@ TclRegisterLiteral(
*/
globalPtr = NULL;
- objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, flags,
+ objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &isNew, nsPtr, flags,
&globalPtr);
objIndex = AddLocalLiteralEntry(envPtr, objPtr, localHash);
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index f745ff0..b82b6af 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -1244,7 +1244,7 @@ TclOODefineSelfObjCmd(
{
Tcl_Namespace *nsPtr;
Object *oPtr;
- int result, private;
+ int result, isPrivate;
oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
@@ -1256,7 +1256,7 @@ TclOODefineSelfObjCmd(
return TCL_OK;
}
- private = IsPrivateDefine(interp);
+ isPrivate = IsPrivateDefine(interp);
/*
* Make the oo::objdefine namespace the current namespace and evaluate the
@@ -1267,7 +1267,7 @@ TclOODefineSelfObjCmd(
if (InitDefineContext(interp, nsPtr, oPtr, objc, objv) != TCL_OK) {
return TCL_ERROR;
}
- if (private) {
+ if (isPrivate) {
((Interp *) interp)->varFramePtr->isProcCallFrame = PRIVATE_FRAME;
}
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index aec764e..3446392 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -809,7 +809,7 @@ InfoObjectVariablesCmd(
{
Object *oPtr;
Tcl_Obj *resultObj;
- int i, private = 0;
+ int i, isPrivate = 0;
if (objc != 2 && objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "objName ?-private?");
@@ -819,7 +819,7 @@ InfoObjectVariablesCmd(
if (strcmp("-private", TclGetString(objv[2])) != 0) {
return TCL_ERROR;
}
- private = 1;
+ isPrivate = 1;
}
oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]);
if (oPtr == NULL) {
@@ -827,7 +827,7 @@ InfoObjectVariablesCmd(
}
resultObj = Tcl_NewObj();
- if (private) {
+ if (isPrivate) {
PrivateVariableMapping *privatePtr;
FOREACH_STRUCT(privatePtr, oPtr->privateVariables) {
@@ -1588,7 +1588,7 @@ InfoClassVariablesCmd(
{
Class *clsPtr;
Tcl_Obj *resultObj;
- int i, private = 0;
+ int i, isPrivate = 0;
if (objc != 2 && objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "className ?-private?");
@@ -1598,7 +1598,7 @@ InfoClassVariablesCmd(
if (strcmp("-private", TclGetString(objv[2])) != 0) {
return TCL_ERROR;
}
- private = 1;
+ isPrivate = 1;
}
clsPtr = GetClassFromObj(interp, objv[1]);
if (clsPtr == NULL) {
@@ -1606,7 +1606,7 @@ InfoClassVariablesCmd(
}
resultObj = Tcl_NewObj();
- if (private) {
+ if (isPrivate) {
PrivateVariableMapping *privatePtr;
FOREACH_STRUCT(privatePtr, clsPtr->privateVariables) {
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 2912211..700323f 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -280,11 +280,11 @@ TclPkgFileSeen(
if (pkgFiles && pkgFiles->names) {
const char *name = pkgFiles->names->name;
Tcl_HashTable *table = &pkgFiles->table;
- int new;
- Tcl_HashEntry *entry = Tcl_CreateHashEntry(table, name, &new);
+ int isNew;
+ Tcl_HashEntry *entry = Tcl_CreateHashEntry(table, name, &isNew);
Tcl_Obj *list;
- if (new) {
+ if (isNew) {
list = Tcl_NewObj();
Tcl_SetHashValue(entry, list);
Tcl_IncrRefCount(list);
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 707870b..b53034b 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -1296,7 +1296,7 @@ InitLocalCache(
Var *varPtr;
LocalCache *localCachePtr;
CompiledLocal *localPtr;
- int new;
+ int isNew;
ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
@@ -1319,7 +1319,7 @@ InitLocalCache(
} else {
*namePtr = TclCreateLiteral(iPtr, localPtr->name,
localPtr->nameLength, /* hash */ -1,
- &new, /* nsPtr */ NULL, 0, NULL);
+ &isNew, /* nsPtr */ NULL, 0, NULL);
Tcl_IncrRefCount(*namePtr);
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index f74d13d..872a0bf 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3458,7 +3458,7 @@ TclStringFirst(
}
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
- unsigned char *end, *try, *bh;
+ unsigned char *end, *check, *bh;
unsigned char *bn = TclGetByteArrayFromObj(needle, &ln);
/* Find bytes in bytes */
@@ -3469,25 +3469,25 @@ TclStringFirst(
}
end = bh + lh;
- try = bh + start;
- while (try + ln <= end) {
+ check = bh + start;
+ while (check + ln <= end) {
/*
* Look for the leading byte of the needle in the haystack
- * starting at try and stopping when there's not enough room
+ * starting at check and stopping when there's not enough room
* for the needle left.
*/
- try = memchr(try, bn[0], (end + 1 - ln) - try);
- if (try == NULL) {
+ check = memchr(check, bn[0], (end + 1 - ln) - check);
+ if (check == NULL) {
/* Leading byte not found -> needle cannot be found. */
return TCL_IO_FAILURE;
}
/* Leading byte found, check rest of needle. */
- if (0 == memcmp(try+1, bn+1, ln-1)) {
+ if (0 == memcmp(check+1, bn+1, ln-1)) {
/* Checks! Return the successful index. */
- return (try - bh);
+ return (check - bh);
}
/* Rest of needle match failed; Iterate to continue search. */
- try++;
+ check++;
}
return TCL_IO_FAILURE;
}
@@ -3505,7 +3505,7 @@ TclStringFirst(
*/
{
- Tcl_UniChar *try, *end, *uh;
+ Tcl_UniChar *check, *end, *uh;
Tcl_UniChar *un = TclGetUnicodeFromObj(needle, &ln);
uh = TclGetUnicodeFromObj(haystack, &lh);
@@ -3515,10 +3515,10 @@ TclStringFirst(
}
end = uh + lh;
- for (try = uh + start; try + ln <= end; try++) {
- if ((*try == *un) && (0 ==
- memcmp(try + 1, un + 1, (ln-1) * sizeof(Tcl_UniChar)))) {
- return (try - uh);
+ for (check = uh + start; check + ln <= end; check++) {
+ if ((*check == *un) && (0 ==
+ memcmp(check + 1, un + 1, (ln-1) * sizeof(Tcl_UniChar)))) {
+ return (check - uh);
}
}
return TCL_IO_FAILURE;
@@ -3562,7 +3562,7 @@ TclStringLast(
}
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
- unsigned char *try, *bh = TclGetByteArrayFromObj(haystack, &lh);
+ unsigned char *check, *bh = TclGetByteArrayFromObj(haystack, &lh);
unsigned char *bn = TclGetByteArrayFromObj(needle, &ln);
if (last + 1 >= lh + 1) {
@@ -3572,20 +3572,20 @@ TclStringLast(
/* Don't start the loop if there cannot be a valid answer */
return TCL_IO_FAILURE;
}
- try = bh + last + 1 - ln;
+ check = bh + last + 1 - ln;
- while (try >= bh) {
- if ((*try == bn[0])
- && (0 == memcmp(try+1, bn+1, ln-1))) {
- return (try - bh);
+ while (check >= bh) {
+ if ((*check == bn[0])
+ && (0 == memcmp(check+1, bn+1, ln-1))) {
+ return (check - bh);
}
- try--;
+ check--;
}
return TCL_IO_FAILURE;
}
{
- Tcl_UniChar *try, *uh = TclGetUnicodeFromObj(haystack, &lh);
+ Tcl_UniChar *check, *uh = TclGetUnicodeFromObj(haystack, &lh);
Tcl_UniChar *un = TclGetUnicodeFromObj(needle, &ln);
if (last + 1 >= lh + 1) {
@@ -3595,13 +3595,13 @@ TclStringLast(
/* Don't start the loop if there cannot be a valid answer */
return TCL_IO_FAILURE;
}
- try = uh + last + 1 - ln;
- while (try >= uh) {
- if ((*try == un[0])
- && (0 == memcmp(try+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
- return (try - uh);
+ check = uh + last + 1 - ln;
+ while (check >= uh) {
+ if ((*check == un[0])
+ && (0 == memcmp(check+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
+ return (check - uh);
}
- try--;
+ check--;
}
return TCL_IO_FAILURE;
}
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 7a7ce6c..68c6c62 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -51,7 +51,7 @@ static int ProcBodyTestCheckObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe);
static int RegisterCommand(Tcl_Interp* interp,
- const char *namespace, const CmdTable *cmdTablePtr);
+ const char *namesp, const CmdTable *cmdTablePtr);
/*
* List of commands to create when the package is loaded; must go after the
@@ -139,7 +139,7 @@ static int
RegisterCommand(
Tcl_Interp* interp, /* the Tcl interpreter for which the operation
* is performed */
- const char *namespace, /* the namespace in which the command is
+ const char *namesp, /* the namespace in which the command is
* registered */
const CmdTable *cmdTablePtr)/* the command to register */
{
@@ -147,13 +147,13 @@ RegisterCommand(
if (cmdTablePtr->exportIt) {
sprintf(buf, "namespace eval %s { namespace export %s }",
- namespace, cmdTablePtr->cmdName);
+ namesp, cmdTablePtr->cmdName);
if (Tcl_EvalEx(interp, buf, -1, 0) != TCL_OK) {
return TCL_ERROR;
}
}
- sprintf(buf, "%s::%s", namespace, cmdTablePtr->cmdName);
+ sprintf(buf, "%s::%s", namesp, cmdTablePtr->cmdName);
Tcl_CreateObjCommand(interp, buf, cmdTablePtr->proc, 0, 0);
return TCL_OK;
}
diff --git a/win/cat.c b/win/cat.c
index d49e37c..3a821a4 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -35,7 +35,7 @@ _tmain(void)
write(1, buf, n);
}
err = (sizeof(int) == 2) ? "stderr16" : "stderr32";
- write(2, err, strlen(err));
+ write(2, err, (unsigned int)strlen(err));
return 0;
}