summaryrefslogtreecommitdiffstats
path: root/win/tclWin32Dll.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-17 21:22:22 (GMT)
commit5234a59846f046760830b06488e2d214d0b2cf04 (patch)
treeeb303b04e47fe05468dc5620171a0ee2c8453095 /win/tclWin32Dll.c
parent2fc3c8d6596a5d180b7f2c13451e8ec26144cb2b (diff)
parentad86656b196a9b34f2df43327c816d8099d7f3c8 (diff)
downloadtcl-5234a59846f046760830b06488e2d214d0b2cf04.zip
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.gz
tcl-5234a59846f046760830b06488e2d214d0b2cf04.tar.bz2
merge trunk
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r--win/tclWin32Dll.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 0d3b683..688fa8d 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -25,23 +25,6 @@
static HINSTANCE hInstance; /* HINSTANCE of this DLL. */
static int platformId; /* Running under NT, or 95/98? */
-#ifdef HAVE_NO_SEH
-/*
- * Unlike Borland and Microsoft, we don't register exception handlers by
- * pushing registration records onto the runtime stack. Instead, we register
- * them by creating an EXCEPTION_REGISTRATION within the activation record.
- */
-
-typedef struct EXCEPTION_REGISTRATION {
- struct EXCEPTION_REGISTRATION *link;
- EXCEPTION_DISPOSITION (*handler)(
- struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
- void *ebp;
- void *esp;
- int status;
-} EXCEPTION_REGISTRATION;
-#endif
-
/*
* VC++ 5.x has no 'cpuid' assembler instruction, so we must emulate it
*/
@@ -86,7 +69,7 @@ TCL_DECLARE_MUTEX(mountPointMap)
* We will need this below.
*/
-#ifdef __WIN32__
+#ifdef _WIN32
#ifndef STATIC_BUILD
/*
@@ -154,7 +137,7 @@ DllMain(
return TRUE;
}
#endif /* !STATIC_BUILD */
-#endif /* __WIN32__ */
+#endif /* _WIN32 */
/*
*----------------------------------------------------------------------
@@ -198,11 +181,11 @@ void
TclWinInit(
HINSTANCE hInst) /* Library instance handle. */
{
- OSVERSIONINFO os;
+ OSVERSIONINFOW os;
hInstance = hInst;
- os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&os);
+ os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
+ GetVersionExW(&os);
platformId = os.dwPlatformId;
/*
@@ -662,7 +645,7 @@ TclWinCPUID(
# else
- EXCEPTION_REGISTRATION registration;
+ TCLEXCEPTION_REGISTRATION registration;
/*
* Execute the CPUID instruction with the given index, and store results
@@ -671,7 +654,7 @@ TclWinCPUID(
__asm__ __volatile__(
/*
- * Construct an EXCEPTION_REGISTRATION to protect the CPUID
+ * Construct an TCLEXCEPTION_REGISTRATION to protect the CPUID
* instruction (early 486's don't have CPUID)
*/
@@ -685,7 +668,7 @@ TclWinCPUID(
"movl %[error], 0x10(%%edx)" "\n\t" /* status */
/*
- * Link the EXCEPTION_REGISTRATION on the chain
+ * Link the TCLEXCEPTION_REGISTRATION on the chain
*/
"movl %%edx, %%fs:0" "\n\t"
@@ -704,7 +687,7 @@ TclWinCPUID(
"movl %%edx, 0xc(%%edi)" "\n\t"
/*
- * Come here on a normal exit. Recover the EXCEPTION_REGISTRATION and
+ * Come here on a normal exit. Recover the TCLEXCEPTION_REGISTRATION and
* store a TCL_OK status.
*/
@@ -714,7 +697,7 @@ TclWinCPUID(
"jmp 2f" "\n"
/*
- * Come here on an exception. Get the EXCEPTION_REGISTRATION that we
+ * Come here on an exception. Get the TCLEXCEPTION_REGISTRATION that we
* previously put on the chain.
*/
@@ -724,7 +707,7 @@ TclWinCPUID(
/*
* Come here however we exited. Restore context from the
- * EXCEPTION_REGISTRATION in case the stack is unbalanced.
+ * TCLEXCEPTION_REGISTRATION in case the stack is unbalanced.
*/
"2:" "\t"