diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-12 15:06:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-12 15:06:51 (GMT) |
commit | 04021938d2c5c4c4f6bdff3dd7b581b21837dff3 (patch) | |
tree | b6ce111a7a4e6a1860cadf0c632fd895d729451a /win | |
parent | ba878ec5c0d48422b9412451c6b9a84c0d7a5e8d (diff) | |
parent | cb4e793d3cde6208d1c12686b85a52f48deec156 (diff) | |
download | tcl-04021938d2c5c4c4f6bdff3dd7b581b21837dff3.zip tcl-04021938d2c5c4c4f6bdff3dd7b581b21837dff3.tar.gz tcl-04021938d2c5c4c4f6bdff3dd7b581b21837dff3.tar.bz2 |
merge trunk
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 4 | ||||
-rw-r--r-- | win/tclWinInit.c | 20 | ||||
-rw-r--r-- | win/tclWinInt.h | 2 | ||||
-rw-r--r-- | win/tclWinPipe.c | 7 | ||||
-rw-r--r-- | win/tclWinReg.c | 10 |
5 files changed, 16 insertions, 27 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 726862f..73b75a6 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -646,8 +646,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.8.10 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/http-2.8.10.tm; + @echo "Installing package http 2.8.11 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/http-2.8.11.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 026fbfc..c590865 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -80,10 +80,7 @@ typedef struct { /* * Windows version dependend functions */ -static TclWinProcs _tclWinProcs = { - NULL -}; -TclWinProcs *tclWinProcs = &_tclWinProcs; +TclWinProcs tclWinProcs; /* * The following arrays contain the human readable strings for the Windows @@ -141,7 +138,7 @@ TclpInitPlatform(void) { WSADATA wsaData; WORD wVersionRequested = MAKEWORD(2, 2); - HINSTANCE hInstance; + HMODULE handle; tclPlatform = TCL_PLATFORM_WINDOWS; @@ -164,12 +161,10 @@ TclpInitPlatform(void) /* * Fill available functions depending on windows version */ - hInstance = LoadLibraryW(L"kernel32"); - if (hInstance != NULL) { - _tclWinProcs.cancelSynchronousIo = - (BOOL (WINAPI *)(HANDLE)) GetProcAddress(hInstance, + handle = GetModuleHandle(TEXT("KERNEL32")); + tclWinProcs.cancelSynchronousIo = + (BOOL (WINAPI *)(HANDLE)) GetProcAddress(handle, "CancelSynchronousIo"); - } } /* @@ -557,16 +552,13 @@ TclpSetVariables( TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY); if (!osInfoInitialized) { - HANDLE handle = LoadLibraryW(L"NTDLL"); + HMODULE handle = GetModuleHandle(TEXT("NTDLL")); int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *)) GetProcAddress(handle, "RtlGetVersion"); osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); if (!getversion || getversion(&osInfo)) { GetVersionExW(&osInfo); } - if (handle) { - FreeLibrary(handle); - } osInfoInitialized = 1; } GetSystemInfo(&sys.info); diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 76f5f68..43799d0 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -38,7 +38,7 @@ typedef struct TclWinProcs { BOOL (WINAPI *cancelSynchronousIo)(HANDLE); } TclWinProcs; -MODULE_SCOPE TclWinProcs *tclWinProcs; +MODULE_SCOPE TclWinProcs tclWinProcs; /* * Some versions of Borland C have a define for the OSVERSIONINFO for diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 4a1e75a..5246d53 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -3253,7 +3253,7 @@ TclPipeThreadStop( HANDLE hThread) { TclPipeThreadInfo *pipeTI = *pipeTIPtr; - HANDLE evControl, wakeEvent; + HANDLE evControl; int state; if (!pipeTI) { @@ -3261,7 +3261,6 @@ TclPipeThreadStop( } pipeTI = *pipeTIPtr; evControl = pipeTI->evControl; - wakeEvent = pipeTI->evWakeUp; pipeTI->evWakeUp = NULL; /* * Try to sane stop the pipe worker, corresponding its current state @@ -3329,8 +3328,8 @@ TclPipeThreadStop( /* * Cancel all sync-IO of this thread (may be blocked there). */ - if (tclWinProcs->cancelSynchronousIo) { - tclWinProcs->cancelSynchronousIo(hThread); + if (tclWinProcs.cancelSynchronousIo) { + tclWinProcs.cancelSynchronousIo(hThread); } /* diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 5f7fd31..de48b9b 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -1197,14 +1197,12 @@ RecursiveDeleteKey( */ if (mode && !checkExProc) { - HINSTANCE dllH; + HMODULE handle; checkExProc = 1; - dllH = LoadLibrary(TEXT("advapi32.dll")); - if (dllH) { - regDeleteKeyExProc = (FARPROC) - GetProcAddress(dllH, "RegDeleteKeyExW"); - } + handle = GetModuleHandle(TEXT("ADVAPI32")); + regDeleteKeyExProc = (FARPROC) + GetProcAddress(handle, "RegDeleteKeyExW"); } if (mode && regDeleteKeyExProc) { result = regDeleteKeyExProc(startKey, keyName, mode, 0); |