summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-03 20:55:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-03 20:55:39 (GMT)
commit05859b921e7478bb5202dcc464028b7b25db7a43 (patch)
tree61350fb27c9295eec081cbd36138e0f5df324c91
parentf2d051b8afa1a1d9acf943607988e4c911ed2d3c (diff)
downloadtcl-05859b921e7478bb5202dcc464028b7b25db7a43.zip
tcl-05859b921e7478bb5202dcc464028b7b25db7a43.tar.gz
tcl-05859b921e7478bb5202dcc464028b7b25db7a43.tar.bz2
don't try to run the cpuid test if cpuid is not available
-rw-r--r--generic/tclTest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 936d8b3..588aff2 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -430,10 +430,12 @@ static Tcl_Obj* SimpleCopy _ANSI_ARGS_ ((Tcl_Obj *pathPtr));
static int TestNumUtfCharsCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
+#if defined(HAVE_CPUID) || defined(__WIN32__)
static int TestcpuidCmd _ANSI_ARGS_(( ClientData dummy,
Tcl_Interp* interp,
int objc,
Tcl_Obj *CONST objv[] ));
+#endif
static Tcl_Filesystem testReportingFilesystem = {
"reporting",
@@ -699,8 +701,10 @@ Tcltest_Init(interp)
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
Tcl_CreateCommand(interp, "testexitmainloop", TestexitmainloopCmd,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+#if defined(HAVE_CPUID) || defined(__WIN32__)
Tcl_CreateObjCommand(interp, "testcpuid", TestcpuidCmd,
(ClientData) 0, (Tcl_CmdDeleteProc*) NULL );
+#endif
t3ArgTypes[0] = TCL_EITHER;
t3ArgTypes[1] = TCL_EITHER;
Tcl_CreateMathFunc(interp, "T3", 2, t3ArgTypes, TestMathFunc2,
@@ -6552,6 +6556,7 @@ TestNumUtfCharsCmd(clientData, interp, objc, objv)
return TCL_OK;
}
+#if defined(HAVE_CPUID) || defined(__WIN32__)
/*
*----------------------------------------------------------------------
*
@@ -6594,11 +6599,7 @@ TestcpuidCmd( ClientData dummy,
if ( Tcl_GetIntFromObj( interp, objv[1], &index ) != TCL_OK ) {
return TCL_ERROR;
}
-#ifdef MAC_TCL
- status = TCL_ERROR;
-#else
status = TclWinCPUID( (unsigned int) index, regs );
-#endif
if ( status != TCL_OK ) {
Tcl_SetObjResult( interp, Tcl_NewStringObj( "operation not available",
-1 ) );
@@ -6611,3 +6612,4 @@ TestcpuidCmd( ClientData dummy,
return TCL_OK;
}
+#endif