summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-06-29 10:07:56 (GMT)
committervincentdarley <vincentdarley>2004-06-29 10:07:56 (GMT)
commitb96dc3a960b8964e84edd279c99a01b92be99278 (patch)
tree42c3707d751aca5f4bbc63dec4a1135a162cb46d /win
parent6e1fd820cba4c1c418981963fa2fe62ea112b69d (diff)
downloadtcl-b96dc3a960b8964e84edd279c99a01b92be99278.zip
tcl-b96dc3a960b8964e84edd279c99a01b92be99278.tar.gz
tcl-b96dc3a960b8964e84edd279c99a01b92be99278.tar.bz2
fix to compilation error with VC++ 5.2
Diffstat (limited to 'win')
-rw-r--r--win/tclWin32Dll.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 42a9ace..7c80eea 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWin32Dll.c,v 1.37 2004/06/21 22:05:55 mdejong Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.38 2004/06/29 10:07:57 vincentdarley Exp $
*/
#include "tclWinInt.h"
@@ -79,6 +79,14 @@ _except_TclWinCPUID_detach_handler(
/*
+ * VC++ 5.x has no 'cpuid' assembler instruction, so we
+ * must emulate it
+ */
+#if defined(_MSC_VER) && ( _MSC_VER <= 1100 )
+#define cpuid __asm __emit 0fh __asm __emit 0a2h
+#endif
+
+/*
* The following function tables are used to dispatch to either the
* wide-character or multi-byte versions of the operating system calls,
* depending on whether the Unicode calls are available.
@@ -1181,7 +1189,7 @@ TclWinCPUID( unsigned int index, /* Which CPUID value to retrieve */
push ecx
push edx
mov eax, regs.dw0
- cpuid
+ cpuid
mov regs.dw0, eax
mov regs.dw1, ebx
mov regs.dw2, ecx