summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-01 08:22:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-01 08:22:56 (GMT)
commitaf6bdabef606d9aefa0cc8c4755c98b1445203d2 (patch)
treeab57aa3d8b666813a33b8d16e17e65e626303495 /win/tclWinInit.c
parent9bf53c41935b068bea5851e66be354f4ba861a44 (diff)
parentb396b6e2533e98a2733a3fa471766e98c2d55088 (diff)
downloadtcl-af6bdabef606d9aefa0cc8c4755c98b1445203d2.zip
tcl-af6bdabef606d9aefa0cc8c4755c98b1445203d2.tar.gz
tcl-af6bdabef606d9aefa0cc8c4755c98b1445203d2.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index d2ee7e1..026fbfc 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -76,6 +76,15 @@ typedef struct {
#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
#endif
+
+/*
+ * Windows version dependend functions
+ */
+static TclWinProcs _tclWinProcs = {
+ NULL
+};
+TclWinProcs *tclWinProcs = &_tclWinProcs;
+
/*
* The following arrays contain the human readable strings for the Windows
* platform and processor values.
@@ -132,6 +141,7 @@ TclpInitPlatform(void)
{
WSADATA wsaData;
WORD wVersionRequested = MAKEWORD(2, 2);
+ HINSTANCE hInstance;
tclPlatform = TCL_PLATFORM_WINDOWS;
@@ -150,6 +160,16 @@ TclpInitPlatform(void)
TclWinInit(GetModuleHandle(NULL));
#endif
+
+ /*
+ * Fill available functions depending on windows version
+ */
+ hInstance = LoadLibraryW(L"kernel32");
+ if (hInstance != NULL) {
+ _tclWinProcs.cancelSynchronousIo =
+ (BOOL (WINAPI *)(HANDLE)) GetProcAddress(hInstance,
+ "CancelSynchronousIo");
+ }
}
/*