summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixCompat.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-04-24 20:21:16 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-04-24 20:21:16 (GMT)
commit830ac5ea69e6a6a3ea77f6032ad6e69a97dc817f (patch)
treef7587ec802d28b8abaedf99e98dd2ba9084c5e6f /unix/tclUnixCompat.c
parent6e14d4b037124606898f47db23fd11da4db0b27e (diff)
parent57eb164841942a064c65e0634679393ff023ab61 (diff)
downloadtcl-830ac5ea69e6a6a3ea77f6032ad6e69a97dc817f.zip
tcl-830ac5ea69e6a6a3ea77f6032ad6e69a97dc817f.tar.gz
tcl-830ac5ea69e6a6a3ea77f6032ad6e69a97dc817f.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.c7
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;
}
/*