diff options
-rw-r--r-- | win/tclWin32Dll.c | 6 | ||||
-rw-r--r-- | win/tclWinFile.c | 7 | ||||
-rw-r--r-- | win/tclWinInit.c | 17 | ||||
-rw-r--r-- | win/tclWinInt.h | 10 | ||||
-rw-r--r-- | win/tclWinPipe.c | 4 | ||||
-rw-r--r-- | win/tclWinPort.h | 6 |
6 files changed, 8 insertions, 42 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index cb9f8c8..cbcb3ed 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -185,12 +185,12 @@ TclWinInit( GetVersionExW(&os); /* - * We no longer support Win32s or Win9x or Windows CE, so just in case - * someone manages to get a runtime there, make sure they know that. + * We no longer support Win32s or Win9x or Windows CE or Windows XP, so just + * in case someone manages to get a runtime there, make sure they know that. */ if (os.dwPlatformId != VER_PLATFORM_WIN32_NT) { - Tcl_Panic("Windows NT is the only supported platform"); + Tcl_Panic("Windows 7 is the minimum supported platform"); } } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 38edd87..728f675 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -264,12 +264,7 @@ WinLink( TclWinConvertError(GetLastError()); } else if (linkAction & TCL_CREATE_SYMBOLIC_LINK) { - if (!tclWinProcs.createSymbolicLink) { - /* - * Can't symlink files. - */ - Tcl_SetErrno(ENOTDIR); - } else if (tclWinProcs.createSymbolicLink(linkSourcePath, linkTargetPath, + if (CreateSymbolicLinkW(linkSourcePath, linkTargetPath, 0x2 /* SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE */)) { /* * Success! diff --git a/win/tclWinInit.c b/win/tclWinInit.c index a7fb8d0..fe58b4c 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -78,11 +78,6 @@ typedef struct { /* - * Windows version dependend functions - */ -TclWinProcs tclWinProcs; - -/* * The following arrays contain the human readable strings for the * processor values. */ @@ -131,7 +126,6 @@ TclpInitPlatform(void) { WSADATA wsaData; WORD wVersionRequested = MAKEWORD(2, 2); - HMODULE handle; tclPlatform = TCL_PLATFORM_WINDOWS; @@ -150,17 +144,6 @@ TclpInitPlatform(void) TclWinInit(GetModuleHandleW(NULL)); #endif - - /* - * Fill available functions depending on windows version - */ - handle = GetModuleHandleW(L"KERNEL32"); - tclWinProcs.cancelSynchronousIo = - (BOOL (WINAPI *)(HANDLE))(void *)GetProcAddress(handle, - "CancelSynchronousIo"); - tclWinProcs.createSymbolicLink = - (BOOLEAN (WINAPI *)(LPCWSTR, LPCWSTR, DWORD))(void *)GetProcAddress(handle, - "CreateSymbolicLinkW"); } /* diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 90a6cea..52a9522 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -32,16 +32,6 @@ typedef struct TCLEXCEPTION_REGISTRATION { #endif /* - * Windows version dependend functions - */ -typedef struct TclWinProcs { - BOOL (WINAPI *cancelSynchronousIo)(HANDLE); - BOOLEAN (WINAPI *createSymbolicLink)(LPCWSTR, LPCWSTR, DWORD); -} TclWinProcs; - -MODULE_SCOPE TclWinProcs tclWinProcs; - -/* * Declarations of functions that are not accessible by way of the * stubs table. */ diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 6a9d9a9..90ac9ef 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -3574,9 +3574,7 @@ TclPipeThreadStop( * Cancel all sync-IO of this thread (may be blocked there). */ - if (tclWinProcs.cancelSynchronousIo) { - tclWinProcs.cancelSynchronousIo(hThread); - } + CancelSynchronousIo(hThread); /* * Wait at most 20 milliseconds for the reader thread to close diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 94c8e87..2c52b73 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -26,14 +26,14 @@ /* * We must specify the lower version we intend to support. * - * WINVER = 0x0501 means Windows XP and above + * WINVER = 0x0601 means Windows 7 and above */ #ifndef WINVER -# define WINVER 0x0501 +# define WINVER 0x0601 #endif #ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 +# define _WIN32_WINNT 0x0601 #endif #define WIN32_LEAN_AND_MEAN |