From b901129d9617508943f0a9e70ae6de14b10c8fec Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 2 Jan 2017 14:31:22 +0000 Subject: [win] bug fix in NativeGetTime: each call of it blurs current performance counters actualized in calibration thread in UpdateTimeEachSecond; This entails that sometimes sporadically time-drifts resp. jump-esque time-shifts occurred, what for example produces very confusing results during time measurement. [unix] wrong cast fixed in TclpGetWideClicks: multiplication with 1000000 in long int may cause overflow See ticket b87ad7e9146832d505f9a430d779c5313c440256 --- unix/tclUnixTime.c | 2 +- win/tclWinTime.c | 54 +++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index df759d8..d634449 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -158,7 +158,7 @@ TclpGetWideClicks(void) Tcl_Time time; tclGetTimeProcPtr(&time, tclTimeClientData); - now = (Tcl_WideInt) (time.sec*1000000 + time.usec); + now = ((Tcl_WideInt)time.sec)*1000000 + time.usec; } else { #ifdef MAC_OSX_TCL now = (Tcl_WideInt) (mach_absolute_time() & INT64_MAX); diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 71a0366..8546c68 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -280,10 +280,6 @@ NativeGetTime( Tcl_Time *timePtr, ClientData clientData) { - struct _timeb t; - int useFtime = 1; /* Flag == TRUE if we need to fall back on - * ftime rather than using the perf counter. */ - /* * Initialize static storage on the first trip through. * @@ -398,6 +394,10 @@ NativeGetTime( * time. */ + ULARGE_INTEGER fileTimeLastCall; + LARGE_INTEGER perfCounterLastCall, curCounterFreq; + /* Copy with current data of calibration cycle */ + LARGE_INTEGER curCounter; /* Current performance counter. */ Tcl_WideInt curFileTime;/* Current estimated time, expressed as 100-ns @@ -411,9 +411,29 @@ NativeGetTime( posixEpoch.LowPart = 0xD53E8000; posixEpoch.HighPart = 0x019DB1DE; + QueryPerformanceCounter(&curCounter); + + /* + * Hold time section locked as short as possible + */ EnterCriticalSection(&timeInfo.cs); - QueryPerformanceCounter(&curCounter); + fileTimeLastCall.QuadPart = timeInfo.fileTimeLastCall.QuadPart; + perfCounterLastCall.QuadPart = timeInfo.perfCounterLastCall.QuadPart; + curCounterFreq.QuadPart = timeInfo.curCounterFreq.QuadPart; + + LeaveCriticalSection(&timeInfo.cs); + + /* + * If calibration cycle occurred after we get curCounter + */ + if (curCounter.QuadPart <= perfCounterLastCall.QuadPart) { + usecSincePosixEpoch = + (fileTimeLastCall.QuadPart - posixEpoch.QuadPart) / 10; + timePtr->sec = (long) (usecSincePosixEpoch / 1000000); + timePtr->usec = (unsigned long) (usecSincePosixEpoch % 1000000); + return; + } /* * If it appears to be more than 1.1 seconds since the last trip @@ -425,31 +445,31 @@ NativeGetTime( * loop should recover. */ - if (curCounter.QuadPart - timeInfo.perfCounterLastCall.QuadPart < - 11 * timeInfo.curCounterFreq.QuadPart / 10) { - curFileTime = timeInfo.fileTimeLastCall.QuadPart + - ((curCounter.QuadPart - timeInfo.perfCounterLastCall.QuadPart) - * 10000000 / timeInfo.curCounterFreq.QuadPart); - timeInfo.fileTimeLastCall.QuadPart = curFileTime; - timeInfo.perfCounterLastCall.QuadPart = curCounter.QuadPart; + if (curCounter.QuadPart - perfCounterLastCall.QuadPart < + 11 * curCounterFreq.QuadPart / 10 + ) { + curFileTime = fileTimeLastCall.QuadPart + + ((curCounter.QuadPart - perfCounterLastCall.QuadPart) + * 10000000 / curCounterFreq.QuadPart); + usecSincePosixEpoch = (curFileTime - posixEpoch.QuadPart) / 10; timePtr->sec = (long) (usecSincePosixEpoch / 1000000); timePtr->usec = (unsigned long) (usecSincePosixEpoch % 1000000); - useFtime = 0; + return; } - - LeaveCriticalSection(&timeInfo.cs); } - if (useFtime) { + do { /* * High resolution timer is not available. Just use ftime. */ + struct _timeb t; _ftime(&t); timePtr->sec = (long)t.time; timePtr->usec = t.millitm * 1000; - } + + } while(0); } /* -- cgit v0.12 From 31e10b3526ac888b69c0b1b3fb57970a26f3514c Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 9 Jan 2017 18:23:44 +0000 Subject: Fix clock test-cases: Make test clock-67.5 time zone independent - execution fails in the time zones below gmt --- tests/clock.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/clock.test b/tests/clock.test index 615f3a8..4e44348 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -36954,10 +36954,10 @@ test clock-67.5 {Change scan %x output on global locale change [Bug 4a0c163d24]} set current [msgcat::mclocale] } -body { msgcat::mclocale de_de - set res [clock scan "01.01.1970" -locale current -format %x] + set res [clock scan "01.01.1970" -locale current -format %x -gmt 1] msgcat::mclocale en_uk # This will fail without the bug fix, as still de_de is active - expr {$res == [clock scan "01/01/1970" -locale current -format %x]} + expr {$res == [clock scan "01/01/1970" -locale current -format %x -gmt 1]} } -cleanup { msgcat::mclocale $current } -result {1} -- cgit v0.12 From f39edc377395db21fa57a8bf93bdbf367b3a5254 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 11 Jan 2017 16:23:18 +0000 Subject: Use more Tcl_AppendResult(), in order to prevent the use of a (char *) type case. --- generic/tclTest.c | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index 85e4a29..faecbc6 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -90,7 +90,7 @@ static Tcl_Trace cmdTrace; * TestdelCmd: */ -typedef struct DelCmd { +typedef struct { Tcl_Interp *interp; /* Interpreter in which command exists. */ char *deleteCmd; /* Script to execute when command is deleted. * Malloc'ed. */ @@ -101,7 +101,7 @@ typedef struct DelCmd { * command. */ -typedef struct TclEncoding { +typedef struct { Tcl_Interp *interp; char *toUtfCmd; char *fromUtfCmd; @@ -124,7 +124,7 @@ static int exitMainLoop = 0; * Event structure used in testing the event queue management procedures. */ -typedef struct TestEvent { +typedef struct { Tcl_Event header; /* Header common to all events */ Tcl_Interp *interp; /* Interpreter that will handle the event */ Tcl_Obj *command; /* Command to evaluate when the event occurs */ @@ -823,7 +823,7 @@ TestasyncCmd( if (argc < 2) { wrongNumArgs: - Tcl_SetResult(interp, (char *)"wrong # args", TCL_STATIC); + Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; } if (strcmp(argv[1], "create") == 0) { @@ -913,7 +913,7 @@ TestasyncCmd( if (Tcl_CreateThread(&threadID, AsyncThreadProc, INT2PTR(id), TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) { - Tcl_SetResult(interp, (char *)"can't create thread", TCL_STATIC); + Tcl_AppendResult(interp, "can't create thread", NULL); Tcl_MutexUnlock(&asyncTestMutex); return TCL_ERROR; } @@ -1060,7 +1060,7 @@ TestcmdinfoCmd( Tcl_DStringResult(interp, &delString); } else if (strcmp(argv[1], "get") == 0) { if (Tcl_GetCommandInfo(interp, argv[2], &info) ==0) { - Tcl_SetResult(interp, (char *)"??", TCL_STATIC); + Tcl_AppendResult(interp, "??", NULL); return TCL_OK; } if (info.proc == CmdProc1) { @@ -1187,7 +1187,7 @@ TestcmdtokenCmd( token = Tcl_CreateCommand(interp, argv[2], CmdProc1, (ClientData) "original", NULL); sprintf(buf, "%p", (void *)token); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_AppendResult(interp, buf, NULL); } else if (strcmp(argv[1], "name") == 0) { Tcl_Obj *objPtr; @@ -1293,7 +1293,7 @@ TestcmdtraceCmd( result = Tcl_EvalEx(interp, argv[2], -1, 0); Tcl_DeleteTrace(interp, cmdTrace); if (!deleteCalled) { - Tcl_SetResult(interp, (char *)"Delete wasn't called", TCL_STATIC); + Tcl_AppendResult(interp, "Delete wasn't called", NULL); return TCL_ERROR; } else { return result; @@ -1593,7 +1593,7 @@ TestdelCmd( Tcl_Interp *slave; if (argc != 4) { - Tcl_SetResult(interp, (char *)"wrong # args", TCL_STATIC); + Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; } @@ -1798,7 +1798,7 @@ TestdstringCmd( if (argc < 2) { wrongNumArgs: - Tcl_SetResult(interp, (char *)"wrong # args", TCL_STATIC); + Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; } if (strcmp(argv[1], "append") == 0) { @@ -1834,9 +1834,9 @@ TestdstringCmd( goto wrongNumArgs; } if (strcmp(argv[2], "staticsmall") == 0) { - Tcl_SetResult(interp, (char *)"short", TCL_STATIC); + Tcl_AppendResult(interp, "short", NULL); } else if (strcmp(argv[2], "staticlarge") == 0) { - Tcl_SetResult(interp, (char *)"first0 first1 first2 first3 first4 first5 first6 first7 first8 first9\nsecond0 second1 second2 second3 second4 second5 second6 second7 second8 second9\nthird0 third1 third2 third3 third4 third5 third6 third7 third8 third9\nfourth0 fourth1 fourth2 fourth3 fourth4 fourth5 fourth6 fourth7 fourth8 fourth9\nfifth0 fifth1 fifth2 fifth3 fifth4 fifth5 fifth6 fifth7 fifth8 fifth9\nsixth0 sixth1 sixth2 sixth3 sixth4 sixth5 sixth6 sixth7 sixth8 sixth9\nseventh0 seventh1 seventh2 seventh3 seventh4 seventh5 seventh6 seventh7 seventh8 seventh9\n", TCL_STATIC); + Tcl_AppendResult(interp, "first0 first1 first2 first3 first4 first5 first6 first7 first8 first9\nsecond0 second1 second2 second3 second4 second5 second6 second7 second8 second9\nthird0 third1 third2 third3 third4 third5 third6 third7 third8 third9\nfourth0 fourth1 fourth2 fourth3 fourth4 fourth5 fourth6 fourth7 fourth8 fourth9\nfifth0 fifth1 fifth2 fifth3 fifth4 fifth5 fifth6 fifth7 fifth8 fifth9\nsixth0 sixth1 sixth2 sixth3 sixth4 sixth5 sixth6 sixth7 sixth8 sixth9\nseventh0 seventh1 seventh2 seventh3 seventh4 seventh5 seventh6 seventh7 seventh8 seventh9\n", NULL); } else if (strcmp(argv[2], "free") == 0) { char *s = ckalloc(100); strcpy(s, "This is a malloc-ed string"); @@ -1996,7 +1996,7 @@ EncodingToUtfProc( TclEncoding *encodingPtr; encodingPtr = (TclEncoding *) clientData; - Tcl_EvalEx(encodingPtr->interp,encodingPtr->toUtfCmd,-1,TCL_EVAL_GLOBAL); + Tcl_EvalEx(encodingPtr->interp, encodingPtr->toUtfCmd, -1, TCL_EVAL_GLOBAL); len = strlen(Tcl_GetStringResult(encodingPtr->interp)); if (len > dstLen) { @@ -2028,7 +2028,7 @@ EncodingFromUtfProc( TclEncoding *encodingPtr; encodingPtr = (TclEncoding *) clientData; - Tcl_EvalEx(encodingPtr->interp, encodingPtr->fromUtfCmd,-1,TCL_EVAL_GLOBAL); + Tcl_EvalEx(encodingPtr->interp, encodingPtr->fromUtfCmd, -1, TCL_EVAL_GLOBAL); len = strlen(Tcl_GetStringResult(encodingPtr->interp)); if (len > dstLen) { @@ -2436,7 +2436,7 @@ TestexprlongCmd( " expression\"", NULL); return TCL_ERROR; } - Tcl_SetResult(interp, (char *)"This is a result", TCL_STATIC); + Tcl_AppendResult(interp, "This is a result", NULL); result = Tcl_ExprLong(interp, argv[1], &exprResult); if (result != TCL_OK) { return result; @@ -2478,7 +2478,7 @@ TestexprlongobjCmd( Tcl_WrongNumArgs(interp, 1, objv, "expression"); return TCL_ERROR; } - Tcl_SetResult(interp, (char *)"This is a result", TCL_STATIC); + Tcl_AppendResult(interp, "This is a result", NULL); result = Tcl_ExprLongObj(interp, objv[1], &exprResult); if (result != TCL_OK) { return result; @@ -2521,7 +2521,7 @@ TestexprdoubleCmd( " expression\"", NULL); return TCL_ERROR; } - Tcl_SetResult(interp, (char *)"This is a result", TCL_STATIC); + Tcl_AppendResult(interp, "This is a result", NULL); result = Tcl_ExprDouble(interp, argv[1], &exprResult); if (result != TCL_OK) { return result; @@ -2564,7 +2564,7 @@ TestexprdoubleobjCmd( Tcl_WrongNumArgs(interp, 1, objv, "expression"); return TCL_ERROR; } - Tcl_SetResult(interp, (char *)"This is a result", TCL_STATIC); + Tcl_AppendResult(interp, "This is a result", NULL); result = Tcl_ExprDoubleObj(interp, objv[1], &exprResult); if (result != TCL_OK) { return result; @@ -4486,7 +4486,7 @@ TestseterrorcodeCmd( const char **argv) /* Argument strings. */ { if (argc > 6) { - Tcl_SetResult(interp, (char *)"too many args", TCL_STATIC); + Tcl_AppendResult(interp, "too many args", NULL); return TCL_ERROR; } switch (argc) { @@ -5090,7 +5090,7 @@ TestsetCmd( const char *value; if (argc == 2) { - Tcl_SetResult(interp, (char *)"before get", TCL_STATIC); + Tcl_AppendResult(interp, "before get", NULL); value = Tcl_GetVar2(interp, argv[1], NULL, flags); if (value == NULL) { return TCL_ERROR; @@ -5098,7 +5098,7 @@ TestsetCmd( Tcl_AppendElement(interp, value); return TCL_OK; } else if (argc == 3) { - Tcl_SetResult(interp, (char *)"before set", TCL_STATIC); + Tcl_AppendResult(interp, "before set", NULL); value = Tcl_SetVar2(interp, argv[1], NULL, argv[2], flags); if (value == NULL) { return TCL_ERROR; @@ -5122,7 +5122,7 @@ Testset2Cmd( const char *value; if (argc == 3) { - Tcl_SetResult(interp, (char *)"before get", TCL_STATIC); + Tcl_AppendResult(interp, "before get", NULL); value = Tcl_GetVar2(interp, argv[1], argv[2], flags); if (value == NULL) { return TCL_ERROR; @@ -5130,7 +5130,7 @@ Testset2Cmd( Tcl_AppendElement(interp, value); return TCL_OK; } else if (argc == 4) { - Tcl_SetResult(interp, (char *)"before set", TCL_STATIC); + Tcl_AppendResult(interp, "before set", NULL); value = Tcl_SetVar2(interp, argv[1], argv[2], argv[3], flags); if (value == NULL) { return TCL_ERROR; @@ -5200,7 +5200,7 @@ TestsaveresultCmd( objPtr = NULL; /* Lint. */ switch ((enum options) index) { case RESULT_SMALL: - Tcl_SetResult(interp, (char *)"small result", TCL_VOLATILE); + Tcl_AppendResult(interp, "small result", NULL); break; case RESULT_APPEND: Tcl_AppendResult(interp, "append result", NULL); @@ -5310,7 +5310,7 @@ TestmainthreadCmd( Tcl_SetObjResult(interp, idObj); return TCL_OK; } else { - Tcl_SetResult(interp, (char *)"wrong # args", TCL_STATIC); + Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; } } @@ -6111,7 +6111,7 @@ TestWrongNumArgsObjCmd( * Don't use Tcl_WrongNumArgs here, as that is the function * we want to test! */ - Tcl_SetResult(interp, (char *)"insufficient arguments", TCL_STATIC); + Tcl_AppendResult(interp, "insufficient arguments", NULL); return TCL_ERROR; } @@ -6128,7 +6128,7 @@ TestWrongNumArgsObjCmd( /* * Asked for more arguments than were given. */ - Tcl_SetResult(interp, (char *)"insufficient arguments", TCL_STATIC); + Tcl_AppendResult(interp, "insufficient arguments", NULL); return TCL_ERROR; } @@ -6905,7 +6905,7 @@ TestgetintCmd( const char **argv) { if (argc < 2) { - Tcl_SetResult(interp, (char *)"wrong # args", TCL_STATIC); + Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; } else { int val, i, total=0; -- cgit v0.12 From 16bf696cda8c2d64b7262c508de606277c018572 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 12 Jan 2017 08:44:56 +0000 Subject: Allows to compile direct from Visual Studio IDE (prevents throwing error "LNK1561: entry point must be defined" by testing linker) --- win/rules.vc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index aa4ed1e..ecdd28f 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -188,9 +188,14 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx !endif !endif +# Prevents "LNK1561: entry point must be defined" error compiling from VS-IDE: +!ifndef LINKER_TESTFLAGS +LINKER_TESTFLAGS = -entry:_DllMainCRTStartup@12 +!endif + !if "$(MACHINE)" == "IX86" ### test for -align:4096, when align:512 will do. -!if [nmakehlp -l -opt:nowin98] +!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)] !message *** Linker has 'Win98 alignment problem' ALIGN98_HACK = 1 !else @@ -203,7 +208,7 @@ ALIGN98_HACK = 0 LINKERFLAGS = -!if [nmakehlp -l -ltcg] +!if [nmakehlp -l -ltcg $(LINKER_TESTFLAGS)] LINKERFLAGS =-ltcg !endif @@ -412,7 +417,7 @@ TCL_NO_DEPRECATED = 0 !if [nmakehlp -f $(CHECKS) "fullwarn"] !message *** Doing full warnings check WARNINGS = -W4 -!if [nmakehlp -l -warn:3] +!if [nmakehlp -l -warn:3 $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS) -warn:3 !endif !else @@ -425,7 +430,7 @@ WARNINGS = $(WARNINGS) -Wp64 !endif !if $(PGO) > 1 -!if [nmakehlp -l -ltcg:pgoptimize] +!if [nmakehlp -l -ltcg:pgoptimize $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize !else MSG=^ @@ -433,7 +438,7 @@ This compiler does not support profile guided optimization. !error $(MSG) !endif !elseif $(PGO) > 0 -!if [nmakehlp -l -ltcg:pginstrument] +!if [nmakehlp -l -ltcg:pginstrument $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument !else MSG=^ -- cgit v0.12 From 141e6231e557acca18c4011cb10ebc546e77df8a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 12 Jan 2017 10:31:46 +0000 Subject: Fix version number in tcl.dsp (thanks to Arjen Markus for noticing this) --- win/tcl.dsp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/win/tcl.dsp b/win/tcl.dsp index 96d5893..6f17cdb 100644 --- a/win/tcl.dsp +++ b/win/tcl.dsp @@ -36,7 +36,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Intermediate_Dir "Release\tcl_Dynamic" # PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=none MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" -# PROP BASE Target_File "Release\tclsh85.exe" +# PROP BASE Target_File "Release\tclsh86.exe" # PROP BASE Bsc_Name "" # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -45,7 +45,7 @@ CFG=tcl - Win32 Debug Static # PROP Intermediate_Dir "Release\tcl_Dynamic" # PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=threads MSVCDIR=IDE" # PROP Rebuild_Opt "clean release" -# PROP Target_File "Release\tclsh85t.exe" +# PROP Target_File "Release\tclsh86t.exe" # PROP Bsc_Name "" # PROP Target_Dir "" @@ -57,7 +57,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Intermediate_Dir "Debug\tcl_Dynamic" # PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" -# PROP BASE Target_File "Debug\tclsh85g.exe" +# PROP BASE Target_File "Debug\tclsh86g.exe" # PROP BASE Bsc_Name "" # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -66,7 +66,7 @@ CFG=tcl - Win32 Debug Static # PROP Intermediate_Dir "Debug\tcl_Dynamic" # PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=threads,symbols MSVCDIR=IDE" # PROP Rebuild_Opt "clean release" -# PROP Target_File "Debug\tclsh85tg.exe" +# PROP Target_File "Debug\tclsh86tg.exe" # PROP Bsc_Name "" # PROP Target_Dir "" @@ -78,7 +78,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Intermediate_Dir "Debug\tcl_Static" # PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" -# PROP BASE Target_File "Debug\tclsh85sg.exe" +# PROP BASE Target_File "Debug\tclsh86sg.exe" # PROP BASE Bsc_Name "" # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -87,7 +87,7 @@ CFG=tcl - Win32 Debug Static # PROP Intermediate_Dir "Debug\tcl_Static" # PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" # PROP Rebuild_Opt "-a" -# PROP Target_File "Debug\tclsh85sg.exe" +# PROP Target_File "Debug\tclsh86sg.exe" # PROP Bsc_Name "" # PROP Target_Dir "" @@ -99,7 +99,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Intermediate_Dir "Release\tcl_Static" # PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" -# PROP BASE Target_File "Release\tclsh85s.exe" +# PROP BASE Target_File "Release\tclsh86s.exe" # PROP BASE Bsc_Name "" # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -108,7 +108,7 @@ CFG=tcl - Win32 Debug Static # PROP Intermediate_Dir "Release\tcl_Static" # PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" # PROP Rebuild_Opt "-a" -# PROP Target_File "Release\tclsh85s.exe" +# PROP Target_File "Release\tclsh86s.exe" # PROP Bsc_Name "" # PROP Target_Dir "" -- cgit v0.12 From 251f7dacec6aa6bcb69903b495307f73449d2bff Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 12 Jan 2017 18:37:50 +0000 Subject: Fixes nmakehlp: allows more as one option by -l, to provide mandatory linker parameters (e. g. "LNK1561: entry point must be defined"); Additionally recognizes an new linker code LNK4224 for "no longer supported; ignored". --- win/nmakehlp.c | 24 ++++++++++++++++-------- win/rules.vc | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 84cf75c..22b7b06 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -43,7 +43,7 @@ /* protos */ static int CheckForCompilerFeature(const char *option); -static int CheckForLinkerFeature(const char *option); +static int CheckForLinkerFeature(const char **options, int count); static int IsIn(const char *string, const char *substring); static int SubstituteFile(const char *substs, const char *filename); static int QualifyPath(const char *path); @@ -102,16 +102,16 @@ main( } return CheckForCompilerFeature(argv[2]); case 'l': - if (argc != 3) { + if (argc < 3) { chars = snprintf(msg, sizeof(msg) - 1, - "usage: %s -l \n" + "usage: %s -l ? ...?\n" "Tests for whether link.exe supports an option\n" "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]); WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL); return 2; } - return CheckForLinkerFeature(argv[2]); + return CheckForLinkerFeature(&argv[2], argc-2); case 'f': if (argc == 2) { chars = snprintf(msg, sizeof(msg) - 1, @@ -313,7 +313,8 @@ CheckForCompilerFeature( static int CheckForLinkerFeature( - const char *option) + const char **options, + int count) { STARTUPINFO si; PROCESS_INFORMATION pi; @@ -322,7 +323,8 @@ CheckForLinkerFeature( char msg[300]; BOOL ok; HANDLE hProcess, h, pipeThreads[2]; - char cmdline[100]; + int i; + char cmdline[255]; hProcess = GetCurrentProcess(); @@ -368,7 +370,11 @@ CheckForLinkerFeature( * Append our option for testing. */ - lstrcat(cmdline, option); + for (i = 0; i < count; i++) { + lstrcat(cmdline, " \""); + lstrcat(cmdline, options[i]); + lstrcat(cmdline, "\""); + } ok = CreateProcess( NULL, /* Module name. */ @@ -433,7 +439,9 @@ CheckForLinkerFeature( return !(strstr(Out.buffer, "LNK1117") != NULL || strstr(Err.buffer, "LNK1117") != NULL || strstr(Out.buffer, "LNK4044") != NULL || - strstr(Err.buffer, "LNK4044") != NULL); + strstr(Err.buffer, "LNK4044") != NULL || + strstr(Out.buffer, "LNK4224") != NULL || + strstr(Err.buffer, "LNK4224") != NULL); } static DWORD WINAPI diff --git a/win/rules.vc b/win/rules.vc index ecdd28f..2edaa49 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -190,7 +190,7 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx # Prevents "LNK1561: entry point must be defined" error compiling from VS-IDE: !ifndef LINKER_TESTFLAGS -LINKER_TESTFLAGS = -entry:_DllMainCRTStartup@12 +LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt !endif !if "$(MACHINE)" == "IX86" -- cgit v0.12 From dcb024402d1a3c73cf744af89c99f82339dc215c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Jan 2017 11:17:17 +0000 Subject: Patch from Zoran Vasiljevic, fix for missing proper initialization of the threaded allocator in some situations. --- generic/tclEvent.c | 3 --- generic/tclThreadAlloc.c | 1 + unix/tclUnixThrd.c | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 0eabc13..b0b8188 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1043,9 +1043,6 @@ TclInitSubsystems(void) #if USE_TCLALLOC TclInitAlloc(); /* Process wide mutex init */ #endif -#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) - TclpInitAllocCache(); -#endif #ifdef TCL_MEM_DEBUG TclInitDbCkalloc(); /* Process wide mutex init */ #endif diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 2ee758e..fc281db 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -210,6 +210,7 @@ GetCache(void) 1 << (NBUCKETS - 2 - i) : 1; bucketInfo[i].lockPtr = TclpNewAllocMutex(); } + TclpInitAllocCache(); } Tcl_MutexUnlock(initLockPtr); } diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 7394545..805599d 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -711,9 +711,7 @@ TclpFreeAllocMutex( void TclpInitAllocCache(void) { - pthread_mutex_lock(allocLockPtr); pthread_key_create(&key, NULL); - pthread_mutex_unlock(allocLockPtr); } void -- cgit v0.12 From db5ec5064a67d11480089bba1753878dc27fbb74 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Jan 2017 12:12:55 +0000 Subject: Enhance nmakehlp, allowing multiple arguments for "-l", and recognizing a new linker code LNK4224. Patch by sebres. --- win/nmakehlp.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 84cf75c..22b7b06 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -43,7 +43,7 @@ /* protos */ static int CheckForCompilerFeature(const char *option); -static int CheckForLinkerFeature(const char *option); +static int CheckForLinkerFeature(const char **options, int count); static int IsIn(const char *string, const char *substring); static int SubstituteFile(const char *substs, const char *filename); static int QualifyPath(const char *path); @@ -102,16 +102,16 @@ main( } return CheckForCompilerFeature(argv[2]); case 'l': - if (argc != 3) { + if (argc < 3) { chars = snprintf(msg, sizeof(msg) - 1, - "usage: %s -l \n" + "usage: %s -l ? ...?\n" "Tests for whether link.exe supports an option\n" "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]); WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL); return 2; } - return CheckForLinkerFeature(argv[2]); + return CheckForLinkerFeature(&argv[2], argc-2); case 'f': if (argc == 2) { chars = snprintf(msg, sizeof(msg) - 1, @@ -313,7 +313,8 @@ CheckForCompilerFeature( static int CheckForLinkerFeature( - const char *option) + const char **options, + int count) { STARTUPINFO si; PROCESS_INFORMATION pi; @@ -322,7 +323,8 @@ CheckForLinkerFeature( char msg[300]; BOOL ok; HANDLE hProcess, h, pipeThreads[2]; - char cmdline[100]; + int i; + char cmdline[255]; hProcess = GetCurrentProcess(); @@ -368,7 +370,11 @@ CheckForLinkerFeature( * Append our option for testing. */ - lstrcat(cmdline, option); + for (i = 0; i < count; i++) { + lstrcat(cmdline, " \""); + lstrcat(cmdline, options[i]); + lstrcat(cmdline, "\""); + } ok = CreateProcess( NULL, /* Module name. */ @@ -433,7 +439,9 @@ CheckForLinkerFeature( return !(strstr(Out.buffer, "LNK1117") != NULL || strstr(Err.buffer, "LNK1117") != NULL || strstr(Out.buffer, "LNK4044") != NULL || - strstr(Err.buffer, "LNK4044") != NULL); + strstr(Err.buffer, "LNK4044") != NULL || + strstr(Out.buffer, "LNK4224") != NULL || + strstr(Err.buffer, "LNK4224") != NULL); } static DWORD WINAPI -- cgit v0.12 From 59cb3424c88d80880f7441393f913ee185a21357 Mon Sep 17 00:00:00 2001 From: venkat Date: Sat, 14 Jan 2017 08:46:06 +0000 Subject: Upgrade TZDATA to IETF tzdata2016j --- library/tzdata/Asia/Aqtau | 1 - library/tzdata/Asia/Atyrau | 58 +++++++++++++++++++++++++++ library/tzdata/Asia/Famagusta | 91 +++++++++++++++++++++++++++++++++++++++++++ library/tzdata/Asia/Gaza | 22 +++++------ library/tzdata/Asia/Hebron | 22 +++++------ library/tzdata/Europe/Saratov | 71 +++++++++++++++++++++++++++++++++ 6 files changed, 242 insertions(+), 23 deletions(-) create mode 100644 library/tzdata/Asia/Atyrau create mode 100644 library/tzdata/Asia/Famagusta create mode 100644 library/tzdata/Europe/Saratov diff --git a/library/tzdata/Asia/Aqtau b/library/tzdata/Asia/Aqtau index 90cc94d..c128b27 100644 --- a/library/tzdata/Asia/Aqtau +++ b/library/tzdata/Asia/Aqtau @@ -4,7 +4,6 @@ set TZData(:Asia/Aqtau) { {-9223372036854775808 12064 0 LMT} {-1441164064 14400 0 +04} {-1247544000 18000 0 +05} - {-220942800 18000 0 +05} {370724400 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +06} diff --git a/library/tzdata/Asia/Atyrau b/library/tzdata/Asia/Atyrau new file mode 100644 index 0000000..f274540 --- /dev/null +++ b/library/tzdata/Asia/Atyrau @@ -0,0 +1,58 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Asia/Atyrau) { + {-9223372036854775808 12464 0 LMT} + {-1441164464 14400 0 +04} + {-1247544000 18000 0 +05} + {370724400 21600 0 +06} + {386445600 18000 0 +05} + {386449200 21600 1 +06} + {402256800 18000 0 +05} + {417985200 21600 1 +06} + {433792800 18000 0 +05} + {449607600 21600 1 +06} + {465339600 18000 0 +05} + {481064400 21600 1 +06} + {496789200 18000 0 +05} + {512514000 21600 1 +06} + {528238800 18000 0 +05} + {543963600 21600 1 +06} + {559688400 18000 0 +05} + {575413200 21600 1 +06} + {591138000 18000 0 +05} + {606862800 21600 1 +06} + {622587600 18000 0 +05} + {638312400 21600 1 +06} + {654642000 18000 0 +05} + {670366800 14400 0 +04} + {670370400 18000 1 +05} + {686095200 14400 0 +04} + {695772000 18000 0 +05} + {701816400 21600 1 +06} + {717541200 18000 0 +05} + {733266000 21600 1 +06} + {748990800 18000 0 +05} + {764715600 21600 1 +06} + {780440400 18000 0 +05} + {796165200 21600 1 +06} + {811890000 18000 0 +05} + {828219600 21600 1 +06} + {846363600 18000 0 +05} + {859669200 21600 1 +06} + {877813200 18000 0 +05} + {891118800 21600 1 +06} + {909262800 18000 0 +05} + {922568400 14400 0 +04} + {922572000 18000 1 +05} + {941320800 14400 0 +04} + {954021600 18000 1 +05} + {972770400 14400 0 +04} + {985471200 18000 1 +05} + {1004220000 14400 0 +04} + {1017525600 18000 1 +05} + {1035669600 14400 0 +04} + {1048975200 18000 1 +05} + {1067119200 14400 0 +04} + {1080424800 18000 1 +05} + {1099173600 18000 0 +05} +} diff --git a/library/tzdata/Asia/Famagusta b/library/tzdata/Asia/Famagusta new file mode 100644 index 0000000..384c183 --- /dev/null +++ b/library/tzdata/Asia/Famagusta @@ -0,0 +1,91 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Asia/Famagusta) { + {-9223372036854775808 8148 0 LMT} + {-1518920148 7200 0 EET} + {166572000 10800 1 EEST} + {182293200 7200 0 EET} + {200959200 10800 1 EEST} + {213829200 7200 0 EET} + {228866400 10800 1 EEST} + {243982800 7200 0 EET} + {260316000 10800 1 EEST} + {276123600 7200 0 EET} + {291765600 10800 1 EEST} + {307486800 7200 0 EET} + {323820000 10800 1 EEST} + {338936400 7200 0 EET} + {354664800 10800 1 EEST} + {370386000 7200 0 EET} + {386114400 10800 1 EEST} + {401835600 7200 0 EET} + {417564000 10800 1 EEST} + {433285200 7200 0 EET} + {449013600 10800 1 EEST} + {465339600 7200 0 EET} + {481068000 10800 1 EEST} + {496789200 7200 0 EET} + {512517600 10800 1 EEST} + {528238800 7200 0 EET} + {543967200 10800 1 EEST} + {559688400 7200 0 EET} + {575416800 10800 1 EEST} + {591138000 7200 0 EET} + {606866400 10800 1 EEST} + {622587600 7200 0 EET} + {638316000 10800 1 EEST} + {654642000 7200 0 EET} + {670370400 10800 1 EEST} + {686091600 7200 0 EET} + {701820000 10800 1 EEST} + {717541200 7200 0 EET} + {733269600 10800 1 EEST} + {748990800 7200 0 EET} + {764719200 10800 1 EEST} + {780440400 7200 0 EET} + {796168800 10800 1 EEST} + {811890000 7200 0 EET} + {828223200 10800 1 EEST} + {843944400 7200 0 EET} + {859672800 10800 1 EEST} + {875394000 7200 0 EET} + {891122400 10800 1 EEST} + {904597200 10800 0 EEST} + {909277200 7200 0 EET} + {922582800 10800 1 EEST} + {941331600 7200 0 EET} + {954032400 10800 1 EEST} + {972781200 7200 0 EET} + {985482000 10800 1 EEST} + {1004230800 7200 0 EET} + {1017536400 10800 1 EEST} + {1035680400 7200 0 EET} + {1048986000 10800 1 EEST} + {1067130000 7200 0 EET} + {1080435600 10800 1 EEST} + {1099184400 7200 0 EET} + {1111885200 10800 1 EEST} + {1130634000 7200 0 EET} + {1143334800 10800 1 EEST} + {1162083600 7200 0 EET} + {1174784400 10800 1 EEST} + {1193533200 7200 0 EET} + {1206838800 10800 1 EEST} + {1224982800 7200 0 EET} + {1238288400 10800 1 EEST} + {1256432400 7200 0 EET} + {1269738000 10800 1 EEST} + {1288486800 7200 0 EET} + {1301187600 10800 1 EEST} + {1319936400 7200 0 EET} + {1332637200 10800 1 EEST} + {1351386000 7200 0 EET} + {1364691600 10800 1 EEST} + {1382835600 7200 0 EET} + {1396141200 10800 1 EEST} + {1414285200 7200 0 EET} + {1427590800 10800 1 EEST} + {1445734800 7200 0 EET} + {1459040400 10800 1 EEST} + {1473285600 10800 0 +03} +} diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index ab53317..1149d51 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -2,17 +2,17 @@ set TZData(:Asia/Gaza) { {-9223372036854775808 8272 0 LMT} - {-2185409872 7200 0 EET} - {-933645600 10800 1 EET} - {-857358000 7200 0 EET} - {-844300800 10800 1 EET} - {-825822000 7200 0 EET} - {-812685600 10800 1 EET} - {-794199600 7200 0 EET} - {-779853600 10800 1 EET} - {-762656400 7200 0 EET} - {-748310400 10800 1 EET} - {-731127600 7200 0 EET} + {-2185409872 7200 0 EEST} + {-933645600 10800 1 EEST} + {-857358000 7200 0 EEST} + {-844300800 10800 1 EEST} + {-825822000 7200 0 EEST} + {-812685600 10800 1 EEST} + {-794199600 7200 0 EEST} + {-779853600 10800 1 EEST} + {-762656400 7200 0 EEST} + {-748310400 10800 1 EEST} + {-731127600 7200 0 EEST} {-682653600 7200 0 EET} {-399088800 10800 1 EEST} {-386650800 7200 0 EET} diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron index c9f94f2..5d312b8 100644 --- a/library/tzdata/Asia/Hebron +++ b/library/tzdata/Asia/Hebron @@ -2,17 +2,17 @@ set TZData(:Asia/Hebron) { {-9223372036854775808 8423 0 LMT} - {-2185410023 7200 0 EET} - {-933645600 10800 1 EET} - {-857358000 7200 0 EET} - {-844300800 10800 1 EET} - {-825822000 7200 0 EET} - {-812685600 10800 1 EET} - {-794199600 7200 0 EET} - {-779853600 10800 1 EET} - {-762656400 7200 0 EET} - {-748310400 10800 1 EET} - {-731127600 7200 0 EET} + {-2185410023 7200 0 EEST} + {-933645600 10800 1 EEST} + {-857358000 7200 0 EEST} + {-844300800 10800 1 EEST} + {-825822000 7200 0 EEST} + {-812685600 10800 1 EEST} + {-794199600 7200 0 EEST} + {-779853600 10800 1 EEST} + {-762656400 7200 0 EEST} + {-748310400 10800 1 EEST} + {-731127600 7200 0 EEST} {-682653600 7200 0 EET} {-399088800 10800 1 EEST} {-386650800 7200 0 EET} diff --git a/library/tzdata/Europe/Saratov b/library/tzdata/Europe/Saratov new file mode 100644 index 0000000..d89a217 --- /dev/null +++ b/library/tzdata/Europe/Saratov @@ -0,0 +1,71 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Europe/Saratov) { + {-9223372036854775808 11058 0 LMT} + {-1593820800 10800 0 +03} + {-1247540400 14400 0 +05} + {354916800 18000 1 +05} + {370724400 14400 0 +04} + {386452800 18000 1 +05} + {402260400 14400 0 +04} + {417988800 18000 1 +05} + {433796400 14400 0 +04} + {449611200 18000 1 +05} + {465343200 14400 0 +04} + {481068000 18000 1 +05} + {496792800 14400 0 +04} + {512517600 18000 1 +05} + {528242400 14400 0 +04} + {543967200 18000 1 +05} + {559692000 14400 0 +04} + {575416800 10800 0 +04} + {575420400 14400 1 +04} + {591145200 10800 0 +03} + {606870000 14400 1 +04} + {622594800 10800 0 +03} + {638319600 14400 1 +04} + {654649200 10800 0 +03} + {670374000 14400 0 +04} + {701820000 10800 0 +04} + {701823600 14400 1 +04} + {717548400 10800 0 +03} + {733273200 14400 1 +04} + {748998000 10800 0 +03} + {764722800 14400 1 +04} + {780447600 10800 0 +03} + {796172400 14400 1 +04} + {811897200 10800 0 +03} + {828226800 14400 1 +04} + {846370800 10800 0 +03} + {859676400 14400 1 +04} + {877820400 10800 0 +03} + {891126000 14400 1 +04} + {909270000 10800 0 +03} + {922575600 14400 1 +04} + {941324400 10800 0 +03} + {954025200 14400 1 +04} + {972774000 10800 0 +03} + {985474800 14400 1 +04} + {1004223600 10800 0 +03} + {1017529200 14400 1 +04} + {1035673200 10800 0 +03} + {1048978800 14400 1 +04} + {1067122800 10800 0 +03} + {1080428400 14400 1 +04} + {1099177200 10800 0 +03} + {1111878000 14400 1 +04} + {1130626800 10800 0 +03} + {1143327600 14400 1 +04} + {1162076400 10800 0 +03} + {1174777200 14400 1 +04} + {1193526000 10800 0 +03} + {1206831600 14400 1 +04} + {1224975600 10800 0 +03} + {1238281200 14400 1 +04} + {1256425200 10800 0 +03} + {1269730800 14400 1 +04} + {1288479600 10800 0 +03} + {1301180400 14400 0 +04} + {1414274400 10800 0 +03} + {1480806000 14400 0 +04} +} -- cgit v0.12 From d97147c2533ecc33102bb142a541dfe148ae7224 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 16 Jan 2017 10:23:14 +0000 Subject: Update zlib to version 1.2.11 --- compat/zlib/CMakeLists.txt | 2 +- compat/zlib/ChangeLog | 4 ++++ compat/zlib/Makefile.in | 4 ++-- compat/zlib/README | 4 ++-- compat/zlib/contrib/delphi/ZLib.pas | 2 +- compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 2 +- compat/zlib/contrib/infback9/inftree9.c | 4 ++-- compat/zlib/contrib/minizip/configure.ac | 2 +- compat/zlib/contrib/pascal/zlibpas.pas | 2 +- compat/zlib/contrib/vstudio/readme.txt | 2 +- compat/zlib/contrib/vstudio/vc10/zlib.rc | 6 +++--- compat/zlib/contrib/vstudio/vc11/zlib.rc | 6 +++--- compat/zlib/contrib/vstudio/vc12/zlib.rc | 6 +++--- .../zlib/contrib/vstudio/vc14/miniunz.vcxproj.user | 4 ---- .../zlib/contrib/vstudio/vc14/minizip.vcxproj.user | 4 ---- .../contrib/vstudio/vc14/testzlib.vcxproj.user | 4 ---- .../contrib/vstudio/vc14/testzlibdll.vcxproj.user | 4 ---- compat/zlib/contrib/vstudio/vc14/zlib.rc | 6 +++--- .../contrib/vstudio/vc14/zlibstat.vcxproj.user | 4 ---- .../zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user | 4 ---- compat/zlib/contrib/vstudio/vc9/zlib.rc | 6 +++--- compat/zlib/deflate.c | 19 ++++++++++++------- compat/zlib/gzlib.c | 2 +- compat/zlib/gzwrite.c | 2 +- compat/zlib/inffast.c | 2 +- compat/zlib/inftrees.c | 4 ++-- compat/zlib/os400/README400 | 2 +- compat/zlib/os400/make.sh | 2 +- compat/zlib/os400/zlib.inc | 6 +++--- compat/zlib/qnx/package.qpg | 10 +++++----- compat/zlib/treebuild.xml | 4 ++-- compat/zlib/trees.c | 4 ++-- compat/zlib/win32/Makefile.msc | 2 +- compat/zlib/win32/README-WIN32.txt | 6 +++--- compat/zlib/win32/README.txt | 4 ++-- compat/zlib/win32/USAGE.txt | 12 ++++++++++-- compat/zlib/win32/VisualC.txt | 2 +- compat/zlib/win32/zdll.lib | Bin 17152 -> 17152 bytes compat/zlib/win32/zlib1.rc | 2 +- compat/zlib/win64/libz.dll.a | Bin 51638 -> 51638 bytes compat/zlib/win64/zdll.lib | Bin 16740 -> 16740 bytes compat/zlib/win64/zlib1.dll | Bin 116224 -> 116736 bytes compat/zlib/zlib.3 | 4 ++-- compat/zlib/zlib.3.pdf | Bin 19324 -> 19318 bytes compat/zlib/zlib.h | 17 +++++++++-------- compat/zlib/zutil.c | 2 +- 46 files changed, 92 insertions(+), 98 deletions(-) delete mode 100644 compat/zlib/contrib/vstudio/vc14/miniunz.vcxproj.user delete mode 100644 compat/zlib/contrib/vstudio/vc14/minizip.vcxproj.user delete mode 100644 compat/zlib/contrib/vstudio/vc14/testzlib.vcxproj.user delete mode 100644 compat/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user delete mode 100644 compat/zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user delete mode 100644 compat/zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user mode change 100644 => 100755 compat/zlib/win32/zdll.lib diff --git a/compat/zlib/CMakeLists.txt b/compat/zlib/CMakeLists.txt index 1a954a6..0fe939d 100644 --- a/compat/zlib/CMakeLists.txt +++ b/compat/zlib/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) -set(VERSION "1.2.10") +set(VERSION "1.2.11") option(ASM686 "Enable building i686 assembly implementation") option(AMD64 "Enable building amd64 assembly implementation") diff --git a/compat/zlib/ChangeLog b/compat/zlib/ChangeLog index fed9adb..30199a6 100644 --- a/compat/zlib/ChangeLog +++ b/compat/zlib/ChangeLog @@ -1,6 +1,10 @@ ChangeLog file for zlib +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + Changes in 1.2.10 (2 Jan 2017) - Avoid warnings on snprintf() return value - Fix bug in deflate_stored() for zero-length input diff --git a/compat/zlib/Makefile.in b/compat/zlib/Makefile.in index 1852192..5a77949 100644 --- a/compat/zlib/Makefile.in +++ b/compat/zlib/Makefile.in @@ -1,5 +1,5 @@ # Makefile for zlib -# Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler +# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: @@ -32,7 +32,7 @@ CPP=$(CC) -E STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.10 +SHAREDLIBV=libz.so.1.2.11 SHAREDLIBM=libz.so.1 LIBS=$(STATICLIB) $(SHAREDLIBV) diff --git a/compat/zlib/README b/compat/zlib/README index e2250bd..51106de 100644 --- a/compat/zlib/README +++ b/compat/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.10 is a general purpose data compression library. All the code is +zlib 1.2.11 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.10 are documented in the file ChangeLog. +The changes made in version 1.2.11 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . diff --git a/compat/zlib/contrib/delphi/ZLib.pas b/compat/zlib/contrib/delphi/ZLib.pas index e9d72f0..060e199 100644 --- a/compat/zlib/contrib/delphi/ZLib.pas +++ b/compat/zlib/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.2.10'; + zlib_version = '1.2.11'; type EZlibError = class(Exception); diff --git a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index a0e3985..44f7633 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -156,7 +156,7 @@ namespace DotZLibTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.2.10", Info.Version); + Assert.AreEqual("1.2.11", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); diff --git a/compat/zlib/contrib/infback9/inftree9.c b/compat/zlib/contrib/infback9/inftree9.c index ea56047..5f4a767 100644 --- a/compat/zlib/contrib/infback9/inftree9.c +++ b/compat/zlib/contrib/infback9/inftree9.c @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.2.10 Copyright 1995-2017 Mark Adler "; + " inflate9 1.2.11 Copyright 1995-2017 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -64,7 +64,7 @@ unsigned short FAR *work; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 192, 202}; + 133, 133, 133, 133, 144, 77, 202}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/compat/zlib/contrib/minizip/configure.ac b/compat/zlib/contrib/minizip/configure.ac index bbb2283..5b11970 100644 --- a/compat/zlib/contrib/minizip/configure.ac +++ b/compat/zlib/contrib/minizip/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([minizip], [1.2.10], [bugzilla.redhat.com]) +AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com]) AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT diff --git a/compat/zlib/contrib/pascal/zlibpas.pas b/compat/zlib/contrib/pascal/zlibpas.pas index 2330898..a0dff11 100644 --- a/compat/zlib/contrib/pascal/zlibpas.pas +++ b/compat/zlib/contrib/pascal/zlibpas.pas @@ -10,7 +10,7 @@ unit zlibpas; interface const - ZLIB_VERSION = '1.2.10'; + ZLIB_VERSION = '1.2.11'; ZLIB_VERNUM = $12a0; type diff --git a/compat/zlib/contrib/vstudio/readme.txt b/compat/zlib/contrib/vstudio/readme.txt index 98d8a05..f67eae8 100644 --- a/compat/zlib/contrib/vstudio/readme.txt +++ b/compat/zlib/contrib/vstudio/readme.txt @@ -1,4 +1,4 @@ -Building instructions for the DLL versions of Zlib 1.2.10 +Building instructions for the DLL versions of Zlib 1.2.11 ======================================================== This directory contains projects that build zlib and minizip using diff --git a/compat/zlib/contrib/vstudio/vc10/zlib.rc b/compat/zlib/contrib/vstudio/vc10/zlib.rc index f1c19bc..fee177a 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc10/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 10, 0 - PRODUCTVERSION 1, 2, 10, 0 + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,7 +17,7 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.10\0" + VALUE "FileVersion", "1.2.11\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" diff --git a/compat/zlib/contrib/vstudio/vc11/zlib.rc b/compat/zlib/contrib/vstudio/vc11/zlib.rc index f1c19bc..fee177a 100644 --- a/compat/zlib/contrib/vstudio/vc11/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc11/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 10, 0 - PRODUCTVERSION 1, 2, 10, 0 + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,7 +17,7 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.10\0" + VALUE "FileVersion", "1.2.11\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" diff --git a/compat/zlib/contrib/vstudio/vc12/zlib.rc b/compat/zlib/contrib/vstudio/vc12/zlib.rc index ef38298..c4e4b01 100644 --- a/compat/zlib/contrib/vstudio/vc12/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc12/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 10, 0 - PRODUCTVERSION 1, 2, 10, 0 + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,7 +17,7 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.10\0" + VALUE "FileVersion", "1.2.11\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" diff --git a/compat/zlib/contrib/vstudio/vc14/miniunz.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/miniunz.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/miniunz.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc14/minizip.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/minizip.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/minizip.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc14/testzlib.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/testzlib.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/testzlib.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc14/zlib.rc b/compat/zlib/contrib/vstudio/vc14/zlib.rc index ef38298..c4e4b01 100644 --- a/compat/zlib/contrib/vstudio/vc14/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc14/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 10, 0 - PRODUCTVERSION 1, 2, 10, 0 + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,7 +17,7 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.10\0" + VALUE "FileVersion", "1.2.11\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" diff --git a/compat/zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user b/compat/zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/compat/zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc9/zlib.rc b/compat/zlib/contrib/vstudio/vc9/zlib.rc index f1c19bc..fee177a 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc9/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 10, 0 - PRODUCTVERSION 1, 2, 10, 0 + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,7 +17,7 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.10\0" + VALUE "FileVersion", "1.2.11\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" diff --git a/compat/zlib/deflate.c b/compat/zlib/deflate.c index 2ad890e..1ec7614 100644 --- a/compat/zlib/deflate.c +++ b/compat/zlib/deflate.c @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.10 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -586,7 +586,8 @@ int ZEXPORT deflateParams(strm, level, strategy) } func = configuration_table[s->level].func; - if ((strategy != s->strategy || func != configuration_table[level].func)) { + if ((strategy != s->strategy || func != configuration_table[level].func) && + s->high_water) { /* Flush the last buffer: */ int err = deflate(strm, Z_BLOCK); if (err == Z_STREAM_ERROR) @@ -1671,8 +1672,6 @@ local block_state deflate_stored(s, flush) len = left + s->strm->avail_in; /* limit len to the input */ if (len > have) len = have; /* limit len to the output */ - if (left > len) - left = len; /* limit window pull to len */ /* If the stored block would be less than min_block in length, or if * unable to copy all of the available input when flushing, then try @@ -1681,13 +1680,13 @@ local block_state deflate_stored(s, flush) */ if (len < min_block && ((len == 0 && flush != Z_FINISH) || flush == Z_NO_FLUSH || - len - left != s->strm->avail_in)) + len != left + s->strm->avail_in)) break; /* Make a dummy stored block in pending to get the header bytes, * including any pending bits. This also updates the debugging counts. */ - last = flush == Z_FINISH && len - left == s->strm->avail_in ? 1 : 0; + last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; _tr_stored_block(s, (char *)0, 0L, last); /* Replace the lengths in the dummy stored block with len. */ @@ -1699,14 +1698,16 @@ local block_state deflate_stored(s, flush) /* Write the stored block header bytes. */ flush_pending(s->strm); - /* Update debugging counts for the data about to be copied. */ #ifdef ZLIB_DEBUG + /* Update debugging counts for the data about to be copied. */ s->compressed_len += len << 3; s->bits_sent += len << 3; #endif /* Copy uncompressed bytes from the window to next_out. */ if (left) { + if (left > len) + left = len; zmemcpy(s->strm->next_out, s->window + s->block_start, left); s->strm->next_out += left; s->strm->avail_out -= left; @@ -1756,6 +1757,8 @@ local block_state deflate_stored(s, flush) s->block_start = s->strstart; s->insert += MIN(used, s->w_size - s->insert); } + if (s->high_water < s->strstart) + s->high_water = s->strstart; /* If the last block was written to next_out, then done. */ if (last) @@ -1783,6 +1786,8 @@ local block_state deflate_stored(s, flush) read_buf(s->strm, s->window + s->strstart, have); s->strstart += have; } + if (s->high_water < s->strstart) + s->high_water = s->strstart; /* There was not enough avail_out to write a complete worthy or flushed * stored block to next_out. Write a stored block to pending instead, if we diff --git a/compat/zlib/gzlib.c b/compat/zlib/gzlib.c index e142ffb..4105e6a 100644 --- a/compat/zlib/gzlib.c +++ b/compat/zlib/gzlib.c @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler + * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/compat/zlib/gzwrite.c b/compat/zlib/gzwrite.c index 1ec1da4..c7b5651 100644 --- a/compat/zlib/gzwrite.c +++ b/compat/zlib/gzwrite.c @@ -1,5 +1,5 @@ /* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/compat/zlib/inffast.c b/compat/zlib/inffast.c index 29eb7d8..0dbd1db 100644 --- a/compat/zlib/inffast.c +++ b/compat/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler + * Copyright (C) 1995-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/compat/zlib/inftrees.c b/compat/zlib/inftrees.c index 8a904dd..2ea08fc 100644 --- a/compat/zlib/inftrees.c +++ b/compat/zlib/inftrees.c @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.10 Copyright 1995-2017 Mark Adler "; + " inflate 1.2.11 Copyright 1995-2017 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 202}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/compat/zlib/os400/README400 b/compat/zlib/os400/README400 index 28dca8c..4f98334 100644 --- a/compat/zlib/os400/README400 +++ b/compat/zlib/os400/README400 @@ -1,4 +1,4 @@ - ZLIB version 1.2.10 for OS/400 installation instructions + ZLIB version 1.2.11 for OS/400 installation instructions 1) Download and unpack the zlib tarball to some IFS directory. (i.e.: /path/to/the/zlib/ifs/source/directory) diff --git a/compat/zlib/os400/make.sh b/compat/zlib/os400/make.sh index ddbfb16..19eec11 100644 --- a/compat/zlib/os400/make.sh +++ b/compat/zlib/os400/make.sh @@ -260,7 +260,7 @@ fi echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c echo '#pragma comment(user, __DATE__)' >> os400.c echo '#pragma comment(user, __TIME__)' >> os400.c -echo '#pragma comment(copyright, "Copyright (C) 1995-2016 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c +echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c make_module OS400 os400.c LINK= # No need to rebuild service program yet. MODULES= diff --git a/compat/zlib/os400/zlib.inc b/compat/zlib/os400/zlib.inc index a2147dd..c6aca2c 100644 --- a/compat/zlib/os400/zlib.inc +++ b/compat/zlib/os400/zlib.inc @@ -1,7 +1,7 @@ * ZLIB.INC - Interface to the general purpose compression library * * ILE RPG400 version by Patrick Monnerat, DATASPHERE. - * Version 1.2.10 + * Version 1.2.11 * * * WARNING: @@ -22,12 +22,12 @@ * * Versioning information. * - D ZLIB_VERSION C '1.2.10' + D ZLIB_VERSION C '1.2.11' D ZLIB_VERNUM C X'12a0' D ZLIB_VER_MAJOR C 1 D ZLIB_VER_MINOR C 2 D ZLIB_VER_REVISION... - D C 10 + D C 11 D ZLIB_VER_SUBREVISION... D C 0 * diff --git a/compat/zlib/qnx/package.qpg b/compat/zlib/qnx/package.qpg index d9a1229..31e8e90 100644 --- a/compat/zlib/qnx/package.qpg +++ b/compat/zlib/qnx/package.qpg @@ -25,10 +25,10 @@ - - - - + + + + @@ -63,7 +63,7 @@ - 1.2.10 + 1.2.11 Medium Stable diff --git a/compat/zlib/treebuild.xml b/compat/zlib/treebuild.xml index a530cc0..fd75525 100644 --- a/compat/zlib/treebuild.xml +++ b/compat/zlib/treebuild.xml @@ -1,6 +1,6 @@ - - + + zip compression library diff --git a/compat/zlib/trees.c b/compat/zlib/trees.c index 357f313..50cf4b4 100644 --- a/compat/zlib/trees.c +++ b/compat/zlib/trees.c @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2016 Jean-loup Gailly + * Copyright (C) 1995-2017 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -906,7 +906,7 @@ void ZLIB_INTERNAL _tr_align(s) /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. + * trees or store, and write out the encoded block. */ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; diff --git a/compat/zlib/win32/Makefile.msc b/compat/zlib/win32/Makefile.msc index 67b7731..6831882 100644 --- a/compat/zlib/win32/Makefile.msc +++ b/compat/zlib/win32/Makefile.msc @@ -1,5 +1,5 @@ # Makefile for zlib using Microsoft (Visual) C -# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler +# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler # # Usage: # nmake -f win32/Makefile.msc (standard build) diff --git a/compat/zlib/win32/README-WIN32.txt b/compat/zlib/win32/README-WIN32.txt index 16adcca..df7ab7f 100644 --- a/compat/zlib/win32/README-WIN32.txt +++ b/compat/zlib/win32/README-WIN32.txt @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.10 is a general purpose data compression library. All the code is +zlib 1.2.11 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -22,7 +22,7 @@ before asking for help. Manifest: -The package zlib-1.2.10-win32-x86.zip will contain the following files: +The package zlib-1.2.11-win32-x86.zip will contain the following files: README-WIN32.txt This document ChangeLog Changes since previous zlib packages @@ -72,7 +72,7 @@ are too numerous to cite here. Copyright notice: - (C) 1995-2012 Jean-loup Gailly and Mark Adler + (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/compat/zlib/win32/README.txt b/compat/zlib/win32/README.txt index de1d05a..bd3d18d 100644 --- a/compat/zlib/win32/README.txt +++ b/compat/zlib/win32/README.txt @@ -6,7 +6,7 @@ What's here Source ====== - zlib version 1.2.10 + zlib version 1.2.11 available at http://www.gzip.org/zlib/ @@ -37,7 +37,7 @@ Build info Copyright notice ================ - Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/compat/zlib/win32/USAGE.txt b/compat/zlib/win32/USAGE.txt index 48e594e..22829eb 100644 --- a/compat/zlib/win32/USAGE.txt +++ b/compat/zlib/win32/USAGE.txt @@ -2,6 +2,9 @@ Installing ZLIB1.DLL ==================== Copy ZLIB1.DLL to the SYSTEM or the SYSTEM32 directory. + + If you want to install the 32-bit dll on a 64-bit + machine, use the SysWOW64 directory instead. Using ZLIB1.DLL with Microsoft Visual C++ @@ -20,12 +23,17 @@ Using ZLIB1.DLL with gcc/MinGW 1. Install the supplied header files "zlib.h" and "zconf.h" into the INCLUDE directory. - 2. Copy the supplied library file "zdll.lib" to "libzdll.a": + 2. (32-bit): Copy the supplied library file "zdll.lib" to "libzdll.a": cp lib/zdll.lib lib/libzdll.a OR - 2' Build the import library from the supplied "zlib.def": + 2'. (64-bit): Copy the supplied library file "libz.dll.a" to "libzdll.a": + cp lib/libz.dll.a lib/libzdll.a + + OR + + 2'' Build the import library from the supplied "zlib.def": dlltool -D zlib1.dll -d lib/zlib.def -l lib/libzdll.a 3. Install "libzdll.a" into the LIB directory. diff --git a/compat/zlib/win32/VisualC.txt b/compat/zlib/win32/VisualC.txt index 579a5fc..1005b21 100644 --- a/compat/zlib/win32/VisualC.txt +++ b/compat/zlib/win32/VisualC.txt @@ -1,3 +1,3 @@ To build zlib using the Microsoft Visual C++ environment, -use the appropriate project from the projects/ directory. +use the appropriate project from the contrib/vstudio/ directory. diff --git a/compat/zlib/win32/zdll.lib b/compat/zlib/win32/zdll.lib old mode 100644 new mode 100755 index 5807541..a3e9a39 Binary files a/compat/zlib/win32/zdll.lib and b/compat/zlib/win32/zdll.lib differ diff --git a/compat/zlib/win32/zlib1.rc b/compat/zlib/win32/zlib1.rc index 5c0feed..234e641 100644 --- a/compat/zlib/win32/zlib1.rc +++ b/compat/zlib/win32/zlib1.rc @@ -26,7 +26,7 @@ BEGIN VALUE "FileDescription", "zlib data compression library\0" VALUE "FileVersion", ZLIB_VERSION "\0" VALUE "InternalName", "zlib1.dll\0" - VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" VALUE "OriginalFilename", "zlib1.dll\0" VALUE "ProductName", "zlib\0" VALUE "ProductVersion", ZLIB_VERSION "\0" diff --git a/compat/zlib/win64/libz.dll.a b/compat/zlib/win64/libz.dll.a index d90a90c..93be06e 100644 Binary files a/compat/zlib/win64/libz.dll.a and b/compat/zlib/win64/libz.dll.a differ diff --git a/compat/zlib/win64/zdll.lib b/compat/zlib/win64/zdll.lib index db56951..c1be098 100644 Binary files a/compat/zlib/win64/zdll.lib and b/compat/zlib/win64/zdll.lib differ diff --git a/compat/zlib/win64/zlib1.dll b/compat/zlib/win64/zlib1.dll index 86b6bbe..81195c3 100755 Binary files a/compat/zlib/win64/zlib1.dll and b/compat/zlib/win64/zlib1.dll differ diff --git a/compat/zlib/zlib.3 b/compat/zlib/zlib.3 index 00dc061..bda4eb0 100644 --- a/compat/zlib/zlib.3 +++ b/compat/zlib/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "2 Jan 2017" +.TH ZLIB 3 "15 Jan 2017" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -105,7 +105,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS AND LICENSE -Version 1.2.10 +Version 1.2.11 .LP Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler .LP diff --git a/compat/zlib/zlib.3.pdf b/compat/zlib/zlib.3.pdf index 20008cd..6fa519c 100644 Binary files a/compat/zlib/zlib.3.pdf and b/compat/zlib/zlib.3.pdf differ diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h index dc90dc8..f09cdaf 100644 --- a/compat/zlib/zlib.h +++ b/compat/zlib/zlib.h @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.10, January 2nd, 2017 + version 1.2.11, January 15th, 2017 Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.10" -#define ZLIB_VERNUM 0x12a0 +#define ZLIB_VERSION "1.2.11" +#define ZLIB_VERNUM 0x12b0 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 10 +#define ZLIB_VER_REVISION 11 #define ZLIB_VER_SUBREVISION 0 /* @@ -712,10 +712,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, used to switch between compression and straight copy of the input data, or to switch to a different kind of input data requiring a different strategy. If the compression approach (which is a function of the level) or the - strategy is changed, then the input available so far is compressed with the - old level and strategy using deflate(strm, Z_BLOCK). There are three - approaches for the compression levels 0, 1..3, and 4..9 respectively. The - new level and strategy will take effect at the next call of deflate(). + strategy is changed, and if any input has been consumed in a previous + deflate() call, then the input available so far is compressed with the old + level and strategy using deflate(strm, Z_BLOCK). There are three approaches + for the compression levels 0, 1..3, and 4..9 respectively. The new level + and strategy will take effect at the next call of deflate(). If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does not have enough output space to complete, then the parameter change will not diff --git a/compat/zlib/zutil.c b/compat/zlib/zutil.c index 56534fb..a76c6b0 100644 --- a/compat/zlib/zutil.c +++ b/compat/zlib/zutil.c @@ -1,5 +1,5 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly + * Copyright (C) 1995-2017 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ -- cgit v0.12 From 9dcacf853204f3d0a155842d157fe8de21d61eff Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 17 Jan 2017 09:02:13 +0000 Subject: Hm. 32-bit zlib dll still was the 1.2.10 version. Corrected now. --- compat/zlib/win32/zlib1.dll | Bin 104960 -> 105472 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/compat/zlib/win32/zlib1.dll b/compat/zlib/win32/zlib1.dll index 81f53ec..3196f4a 100755 Binary files a/compat/zlib/win32/zlib1.dll and b/compat/zlib/win32/zlib1.dll differ -- cgit v0.12 From 592e0f1dd91bee030010bd5efb84d9f6d976f22a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 17 Jan 2017 10:00:58 +0000 Subject: Test-cases which require Tcl 8.5 (or 8.6) should continue to work unmodified in Tcl 9.0. The "novem" branch will show whether this continues to work. --- tests/all.tcl | 2 +- tests/httpd11.tcl | 2 +- tests/httpold.test | 2 +- tests/msgcat.test | 48 ++++++++++++++++++++++++------------------------ tests/safe.test | 2 +- tests/tm.test | 4 ++-- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/all.tcl b/tests/all.tcl index 0a6f57f..69a16ba 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -11,7 +11,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. package prefer latest -package require Tcl 8.5 +package require Tcl 8.5- package require tcltest 2.2 namespace import tcltest::* configure {*}$argv -testdir [file dir [info script]] diff --git a/tests/httpd11.tcl b/tests/httpd11.tcl index 6eae2b7..7880494 100644 --- a/tests/httpd11.tcl +++ b/tests/httpd11.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require Tcl 8.6 +package require Tcl 8.6- proc ::tcl::dict::get? {dict key} { if {[dict exists $dict $key]} { diff --git a/tests/httpold.test b/tests/httpold.test index aeba311..5995bed 100644 --- a/tests/httpold.test +++ b/tests/httpold.test @@ -36,7 +36,7 @@ if {[catch {package require http 1.0}]} { set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null" catch {unset data} -## +## ## The httpd script implement a stub http server ## source [file join [file dirname [info script]] httpd] diff --git a/tests/msgcat.test b/tests/msgcat.test index ae35272..1c3ce58 100644 --- a/tests/msgcat.test +++ b/tests/msgcat.test @@ -12,7 +12,7 @@ # Note that after running these tests, entries will be left behind in the # message catalogs for locales foo, foo_BAR, and foo_BAR_baz. -package require Tcl 8.5 +package require Tcl 8.5- if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." return @@ -51,7 +51,7 @@ namespace eval ::msgcat::test { variable body variable result variable setVars - foreach setVars [PowerSet $envVars] { + foreach setVars [PowerSet $envVars] { set result [string tolower [lindex $setVars 0]] if {[string length $result] == 0} { if {[info exists ::tcl::mac::locale]} { @@ -94,7 +94,7 @@ namespace eval ::msgcat::test { incr count } unset -nocomplain result - + # Could add tests of initialization from Windows registry here. # Use a fake registry package. @@ -294,11 +294,11 @@ namespace eval ::msgcat::test { variable count 2 variable result array set result { - foo,ov0 ov0_ROOT foo,ov1 ov1_foo foo,ov2 ov2_foo + foo,ov0 ov0_ROOT foo,ov1 ov1_foo foo,ov2 ov2_foo foo,ov3 ov3_foo foo,ov4 ov4 - foo_BAR,ov0 ov0_ROOT foo_BAR,ov1 ov1_foo foo_BAR,ov2 ov2_foo_BAR - foo_BAR,ov3 ov3_foo_BAR foo_BAR,ov4 ov4 - foo_BAR_baz,ov0 ov0_ROOT foo_BAR_baz,ov1 ov1_foo + foo_BAR,ov0 ov0_ROOT foo_BAR,ov1 ov1_foo foo_BAR,ov2 ov2_foo_BAR + foo_BAR,ov3 ov3_foo_BAR foo_BAR,ov4 ov4 + foo_BAR_baz,ov0 ov0_ROOT foo_BAR_baz,ov1 ov1_foo foo_BAR_baz,ov2 ov2_foo_BAR foo_BAR_baz,ov3 ov3_foo_BAR_baz foo_BAR_baz,ov4 ov4 } @@ -417,12 +417,12 @@ namespace eval ::msgcat::test { variable locale [mclocale] ::msgcat::mclocale "" ::msgcat::mcloadedlocales clear - ::msgcat::mcpackageconfig unset mcfolder + ::msgcat::mcpackageconfig unset mcfolder mclocale $loc } -cleanup { mclocale $locale ::msgcat::mcloadedlocales clear - ::msgcat::mcpackageconfig unset mcfolder + ::msgcat::mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result [expr { $count+1 }] @@ -437,7 +437,7 @@ namespace eval ::msgcat::test { } -cleanup { mclocale $locale mcloadedlocales clear - mcpackageconfig unset mcfolder + mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result 3 @@ -448,7 +448,7 @@ namespace eval ::msgcat::test { } -cleanup { mclocale $locale mcloadedlocales clear - mcpackageconfig unset mcfolder + mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result 1 @@ -517,7 +517,7 @@ namespace eval ::msgcat::test { } -cleanup { mclocale $locale mcloadedlocales clear - mcpackageconfig unset mcfolder + mcpackageconfig unset mcfolder } -body { mclocale foo mcpackageconfig set mcfolder $msgdir @@ -536,7 +536,7 @@ namespace eval ::msgcat::test { # Tests msgcat-6.*: [mcset], [mc] namespace inheritance # # Test mcset and mc, ensuring that resolution for messages -# proceeds from the current ns to its parent and so on to the +# proceeds from the current ns to its parent and so on to the # global ns. # # Do this for the 12 permutations of @@ -580,7 +580,7 @@ namespace eval ::msgcat::test { ::msgcat::mcset foo ov3 "ov3_foo_bar_baz" } } - + } variable locale [mclocale] mclocale foo @@ -689,12 +689,12 @@ namespace eval ::msgcat::test { mcexists } -returnCodes 1\ -result {wrong # args: should be "mcexists ?-exactnamespace? ?-exactlocale? src"} - + test msgcat-9.2 {mcexists unknown option} -body { - mcexists -unknown src + mcexists -unknown src } -returnCodes 1\ -result {unknown option "-unknown"} - + test msgcat-9.3 {mcexists} -setup { mcforgetpackage variable locale [mclocale] @@ -716,7 +716,7 @@ namespace eval ::msgcat::test { } -body { list [mcexists k1] [mcexists -exactlocale k1] } -result {1 0} - + test msgcat-9.5 {mcexists parent namespace} -setup { mcforgetpackage variable locale [mclocale] @@ -730,19 +730,19 @@ namespace eval ::msgcat::test { [::msgcat::mcexists -exactnamespace k1] } } -result {1 0} - + # Tests msgcat-10.*: [mcloadedlocales] test msgcat-10.1 {mcloadedlocales no arg} -body { mcloadedlocales } -returnCodes 1\ -result {wrong # args: should be "mcloadedlocales subcommand"} - + test msgcat-10.2 {mcloadedlocales wrong subcommand} -body { mcloadedlocales junk } -returnCodes 1\ -result {unknown subcommand "junk": must be clear, or loaded} - + test msgcat-10.3 {mcloadedlocales loaded} -setup { mcforgetpackage variable locale [mclocale] @@ -755,7 +755,7 @@ namespace eval ::msgcat::test { # The result is position independent so sort set resultlist [lsort [mcloadedlocales loaded]] } -result {{} foo foo_bar} - + test msgcat-10.4 {mcloadedlocales clear} -setup { mcforgetpackage variable locale [mclocale] @@ -961,9 +961,9 @@ namespace eval ::msgcat::test { } -result {0 0 1 0} # option mcfolder is already tested with 5.11 - + # Tests msgcat-14.*: callbacks: loadcmd, changecmd, unknowncmd - + # This routine is used as bgerror and by direct callback invocation proc callbackproc args { variable resultvariable diff --git a/tests/safe.test b/tests/safe.test index 6c9c6c9..e43ce12 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require Tcl 8.5 +package require Tcl 8.5- if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 diff --git a/tests/tm.test b/tests/tm.test index 1b22f8c..567d351 100644 --- a/tests/tm.test +++ b/tests/tm.test @@ -6,7 +6,7 @@ # Copyright (c) 2004 by Donal K. Fellows. # All rights reserved. -package require Tcl 8.5 +package require Tcl 8.5- if {"::tcltest" ni [namespace children]} { package require tcltest 2 namespace import -force ::tcltest::* @@ -200,7 +200,7 @@ test tm-3.11 {tm: module path management, remove ignores unknown path} -setup { proc genpaths {base} { # Normalizing picks up drive letters on windows [Bug 1053568] set base [file normalize $base] - lassign [split [package present Tcl] .] major minor + lassign [split [package present Tcl] .] major minor set results {} set base [file join $base tcl$major] lappend results [file join $base site-tcl] -- cgit v0.12 From c3dbeb6e6ff78ff7393f4546ab4156aa1262e859 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 17 Jan 2017 12:02:43 +0000 Subject: Implement tag "deprecated" in genStubs.tcl. Will be used in Tk 8.7, for tagging the deprecated function Tk_FreeXId() --- tools/genStubs.tcl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 9f2c6ca..742aa46 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -199,6 +199,13 @@ proc genStubs::declare {args} { set stubs($curName,$platform,lastNum) $index } } + if {$platformList eq "deprecated"} { + set stubs($curName,generic,$index) $decl + if {![info exists stubs($curName,generic,lastNum)] \ + || ($index > $stubs($curName,generic,lastNum))} { + set stubs($curName,$platform,lastNum) $index + } + } } return } @@ -455,10 +462,16 @@ proc genStubs::parseArg {arg} { proc genStubs::makeDecl {name decl index} { variable scspec + variable stubs + variable libraryName lassign $decl rtype fname args append text "/* $index */\n" + if {[info exists stubs($name,deprecated,$index)]} { + set line "[string toupper $libraryName]_DEPRECATED $rtype" + } else { set line "$scspec $rtype" + } set count [expr {2 - ([string length $line] / 8)}] append line [string range "\t\t\t" 0 $count] set pad [expr {24 - [string length $line]}] @@ -682,7 +695,10 @@ proc genStubs::forAllStubs {name slotProc onAll textVar for {set i 0} {$i <= $lastNum} {incr i} { set slots [array names stubs $name,*,$i] set emit 0 - if {[info exists stubs($name,generic,$i)]} { + if {[info exists stubs($name,deprecated,$i)]} { + append text [$slotProc $name $stubs($name,generic,$i) $i] + set emit 1 + } elseif {[info exists stubs($name,generic,$i)]} { if {[llength $slots] > 1} { puts stderr "conflicting generic and platform entries:\ $name $i" -- cgit v0.12 From 3f648e4efddf57078b99ef451e9418fbec4b3abe Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 19 Jan 2017 22:37:48 +0000 Subject: Fix [1f4bb8162f]: lsort -dictionary documentation to be improved --- doc/lsort.n | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/lsort.n b/doc/lsort.n index b0f7973..c3245b2 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -40,7 +40,8 @@ except (a) case is ignored except as a tie-breaker and (b) if two strings contain embedded numbers, the numbers compare as integers, not characters. For example, in \fB\-dictionary\fR mode, \fBbigBoy\fR sorts between \fBbigbang\fR and \fBbigboy\fR, and \fBx10y\fR -sorts between \fBx9y\fR and \fBx11y\fR. +sorts between \fBx9y\fR and \fBx11y\fR. Overrides the \fB\-nocase\fR +option. .TP \fB\-integer\fR . -- cgit v0.12 From f421ab92dcd3d8e15e14424401e18ace004fbb5e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 20 Jan 2017 16:18:00 +0000 Subject: Fix [39f6304c2e90549c209cd11a7920dc9921b9f48e|39f6304c2e] follow-up: Make Tcl_LinkVar toleranto to the empty string as well --- generic/tclLink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generic/tclLink.c b/generic/tclLink.c index 0b21997..2dc2e47 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -724,8 +724,8 @@ SetInvalidRealFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) { /* * This function checks for integer representations, which are valid * when linking with C variables, but which are invalid in other - * contexts in Tcl. Handled are "+", "-", "0x", "0b" and "0o" (upper- - * and lowercase). See bug [39f6304c2e]. + * contexts in Tcl. Handled are "", "+", "-", "0x", "0b" and "0o" + * (upperand lowercase). See bug [39f6304c2e]. */ int GetInvalidIntFromObj(Tcl_Obj *objPtr, @@ -737,7 +737,8 @@ GetInvalidIntFromObj(Tcl_Obj *objPtr, if ((length == 1) && strchr("+-", str[0])) { *intPtr = (str[0] == '+'); return TCL_OK; - } else if ((length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1])) { + } else if ((length == 0) || + ((length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1]))) { *intPtr = 0; return TCL_OK; } -- cgit v0.12