diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-24 20:21:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-24 20:21:16 (GMT) |
commit | 40cddf0eb5289dc809a95140da0fef1e2d2e2f82 (patch) | |
tree | f7587ec802d28b8abaedf99e98dd2ba9084c5e6f /unix/tclUnixCompat.c | |
parent | 6f14ff020a548ab6adcb30836c498ab0fe921970 (diff) | |
parent | 4f07974ad48f283b3c7bc0aa520b59a8450771cb (diff) | |
download | tcl-40cddf0eb5289dc809a95140da0fef1e2d2e2f82.zip tcl-40cddf0eb5289dc809a95140da0fef1e2d2e2f82.tar.gz tcl-40cddf0eb5289dc809a95140da0fef1e2d2e2f82.tar.bz2 |
[Bug 3508771] load tclreg.dll in cygwin tclsh
Implement TclWinGetSockOpt, TclWinGetServByName
and TclWinCPUID for Cygwin
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r-- | unix/tclUnixCompat.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 16e7a61..aad3d76 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -692,8 +692,11 @@ TclWinCPUID( { int status = TCL_ERROR; - /* There is no reason this couldn't be implemented on UNIX as well */ - return status; +#ifdef HAVE_CPUID + __asm__ __volatile__ ("cpuid":\ + "=a" (regsPtr[0]), "=b" (regsPtr[1]), "=c" (regsPtr[2]), "=d" (regsPtr[3]) : "a" (index)); + status = TCL_OK; +#endif return status; } /* |