From 9eeda3feb240ef5f29417a952c06a8c5b12dc3bd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 26 Feb 2020 07:51:52 +0000 Subject: Make tclWinDde.c compilable with C++ compiler. dde -> 1.4.3 Make tclWinReg.c compilable with C++ compiler. registry -> 1.3.5 --- generic/tclTest.c | 2 +- library/dde/pkgIndex.tcl | 4 ++-- library/reg/pkgIndex.tcl | 4 ++-- tests/fCmd.test | 2 +- tests/registry.test | 4 ++-- tests/winDde.test | 4 ++-- win/Makefile.in | 4 ++-- win/makefile.vc | 8 ++++---- win/tclWinDde.c | 6 +++--- win/tclWinReg.c | 10 +++++----- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index beb0725..66b2233 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -564,7 +564,7 @@ Tcltest_Init( Tcl_Obj *listPtr; Tcl_Obj **objv; int objc, index; - static const char *specialOptions[] = { + static const char *const specialOptions[] = { "-appinitprocerror", "-appinitprocdeleteinterp", "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL }; diff --git a/library/dde/pkgIndex.tcl b/library/dde/pkgIndex.tcl index f6a479d..b7187c0 100644 --- a/library/dde/pkgIndex.tcl +++ b/library/dde/pkgIndex.tcl @@ -1,7 +1,7 @@ if {![package vsatisfies [package provide Tcl] 8.5]} return if {[info sharedlibextension] != ".dll"} return if {[::tcl::pkgconfig get debug]} { - package ifneeded dde 1.4.2 [list load [file join $dir tcldde14g.dll] dde] + package ifneeded dde 1.4.3 [list load [file join $dir tcldde14g.dll] dde] } else { - package ifneeded dde 1.4.2 [list load [file join $dir tcldde14.dll] dde] + package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll] dde] } diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index 219e41f..f2fb3b7 100755 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -1,9 +1,9 @@ if {![package vsatisfies [package provide Tcl] 8.5]} return if {[info sharedlibextension] != ".dll"} return if {[::tcl::pkgconfig get debug]} { - package ifneeded registry 1.3.4 \ + package ifneeded registry 1.3.5 \ [list load [file join $dir tclreg13g.dll] registry] } else { - package ifneeded registry 1.3.4 \ + package ifneeded registry 1.3.5 \ [list load [file join $dir tclreg13.dll] registry] } diff --git a/tests/fCmd.test b/tests/fCmd.test index 7c8c49f..9b6c21e 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -30,7 +30,7 @@ testConstraint reg 0 if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands - set ::regver [package require registry 1.3.4] + set ::regver [package require registry 1.3.5] }]} { testConstraint reg 1 } diff --git a/tests/registry.test b/tests/registry.test index 86f4ef3..8cfd5be 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -19,7 +19,7 @@ testConstraint reg 0 if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands - set ::regver [package require registry 1.3.4] + set ::regver [package require registry 1.3.5] }]} { testConstraint reg 1 } @@ -33,7 +33,7 @@ testConstraint english [expr { test registry-1.0 {check if we are testing the right dll} {win reg} { set ::regver -} {1.3.4} +} {1.3.5} test registry-1.1 {argument parsing for registry command} {win reg} { list [catch {registry} msg] $msg } {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} diff --git a/tests/winDde.test b/tests/winDde.test index 412c476..acba304 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -20,7 +20,7 @@ testConstraint dde 0 if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands - set ::ddever [package require dde 1.4.2] + set ::ddever [package require dde 1.4.3] set ::ddelib [lindex [package ifneeded dde $::ddever] 1]}]} { testConstraint dde 1 } @@ -104,7 +104,7 @@ proc createChildProcess {ddeServerName args} { # ------------------------------------------------------------------------- test winDde-1.0 {check if we are testing the right dll} {win dde} { set ::ddever -} {1.4.2} +} {1.4.3} test winDde-1.1 {Settings the server's topic name} -constraints dde -body { list [dde servername foobar] [dde servername] [dde servername self] diff --git a/win/Makefile.in b/win/Makefile.in index 47a754d..63f4c15 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -148,8 +148,8 @@ REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${LIBSUFFIX} TEST_EXE_FILE = tcltest${EXESUFFIX} TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${LIBSUFFIX} -TEST_LOAD_PRMS = package ifneeded dde 1.4.2 [list load [file normalize ${DDE_DLL_FILE}] dde];\ - package ifneeded registry 1.3.4 [list load [file normalize ${REG_DLL_FILE}] registry] +TEST_LOAD_PRMS = package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}] dde];\ + package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}] registry] TEST_LOAD_FACILITIES = $(TEST_LOAD_PRMS) SHARED_LIBRARIES = $(TCL_DLL_FILE) diff --git a/win/makefile.vc b/win/makefile.vc index 0dad6ee..1924e33 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -540,14 +540,14 @@ test-core: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT:\=/)/library !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" $(DEBUGGER) $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile << - package ifneeded dde 1.4.2 [list load "$(TCLDDELIB:\=/)" dde] - package ifneeded registry 1.3.4 [list load "$(TCLREGLIB:\=/)" registry] + package ifneeded dde 1.4.3 [list load "$(TCLDDELIB:\=/)" dde] + package ifneeded registry 1.3.5 [list load "$(TCLREGLIB:\=/)" registry] << !else @echo Please wait while the tests are collected... $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile << > tests.log - package ifneeded dde 1.4.2 "$(TCLDDELIB:\=/)" dde] - package ifneeded registry 1.3.4 "$(TCLREGLIB:\=/)" registry] + package ifneeded dde 1.4.3 "$(TCLDDELIB:\=/)" dde] + package ifneeded registry 1.3.5 "$(TCLREGLIB:\=/)" registry] << type tests.log | more !endif diff --git a/win/tclWinDde.c b/win/tclWinDde.c index cbbcdae..a4c00fa 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -79,7 +79,7 @@ static DWORD ddeInstance; /* The application instance handle given to us * by DdeInitialize. */ static int ddeIsServer = 0; -#define TCL_DDE_VERSION "1.4.2" +#define TCL_DDE_VERSION "1.4.3" #define TCL_DDE_PACKAGE_NAME "dde" #define TCL_DDE_SERVICE_NAME L"TclEval" #define TCL_DDE_EXECUTE_RESULT L"$TCLEVAL$EXECUTE$RESULT" @@ -119,8 +119,8 @@ static int DdeObjCmd(void *clientData, #if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) # if TCL_UTF_MAX > 3 -# define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf(a,(b)*sizeof(WCHAR),c) -# define Tcl_UtfToWCharDString(a,b,c) Tcl_WinUtfToTChar(a,b,c) +# define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf((TCHAR *)(a),(b)*sizeof(WCHAR),c) +# define Tcl_UtfToWCharDString(a,b,c) (WCHAR *)Tcl_WinUtfToTChar(a,b,c) # else # define Tcl_WCharToUtfDString Tcl_UniCharToUtfDString # define Tcl_UtfToWCharDString Tcl_UtfToUniCharDString diff --git a/win/tclWinReg.c b/win/tclWinReg.c index b66282a..7bbb10b 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -126,8 +126,8 @@ static int SetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj, #if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) # if TCL_UTF_MAX > 3 -# define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf(a,(b)*sizeof(WCHAR),c) -# define Tcl_UtfToWCharDString(a,b,c) Tcl_WinUtfToTChar(a,b,c) +# define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf((TCHAR *)(a),(b)*sizeof(WCHAR),c) +# define Tcl_UtfToWCharDString(a,b,c) (WCHAR *)Tcl_WinUtfToTChar(a,b,c) # else # define Tcl_WCharToUtfDString Tcl_UniCharToUtfDString # define Tcl_UtfToWCharDString Tcl_UtfToUniCharDString @@ -191,7 +191,7 @@ Registry_Init( cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, interp, DeleteCmd); Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd); - return Tcl_PkgProvideEx(interp, "registry", "1.3.4", NULL); + return Tcl_PkgProvideEx(interp, "registry", "1.3.5", NULL); } /* @@ -444,7 +444,7 @@ DeleteKey( */ keyName = Tcl_GetString(keyNameObj); - buffer = Tcl_Alloc(keyNameObj->length + 1); + buffer = (char *)Tcl_Alloc(keyNameObj->length + 1); strcpy(buffer, keyName); if (ParseKeyName(interp, buffer, &hostName, &rootKey, @@ -977,7 +977,7 @@ OpenKey( DWORD result; keyName = Tcl_GetString(keyNameObj); - buffer = Tcl_Alloc(keyNameObj->length + 1); + buffer = (char *)Tcl_Alloc(keyNameObj->length + 1); strcpy(buffer, keyName); result = ParseKeyName(interp, buffer, &hostName, &rootKey, &keyName); -- cgit v0.12