diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 20:55:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 20:55:39 (GMT) |
commit | 158419edc08948e941e2f0303a154840978669eb (patch) | |
tree | 61350fb27c9295eec081cbd36138e0f5df324c91 | |
parent | fd30b7a12eaad501b7b4ffa107c93f58283008b9 (diff) | |
download | tcl-158419edc08948e941e2f0303a154840978669eb.zip tcl-158419edc08948e941e2f0303a154840978669eb.tar.gz tcl-158419edc08948e941e2f0303a154840978669eb.tar.bz2 |
don't try to run the cpuid test if cpuid is not available
-rw-r--r-- | generic/tclTest.c | 10 |
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 |