summaryrefslogtreecommitdiffstats
path: root/win/tclWinThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:07:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:07:32 (GMT)
commite82b21ebc983b5f43ad7a4e9d0d90c47e2cbe73b (patch)
treed306997a9f292d958ea83898073c1af4fda50823 /win/tclWinThrd.c
parentc45b50173ca951f918919aedca75f22bf1ccf7b3 (diff)
downloadtcl-e82b21ebc983b5f43ad7a4e9d0d90c47e2cbe73b.zip
tcl-e82b21ebc983b5f43ad7a4e9d0d90c47e2cbe73b.tar.gz
tcl-e82b21ebc983b5f43ad7a4e9d0d90c47e2cbe73b.tar.bz2
Workaround for mingw versions which don't provide _fpcontrol in float.h
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r--win/tclWinThrd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 21d422f..4e53ef5 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -17,6 +17,14 @@
#include <io.h>
#include <sys/stat.h>
+/* Workaround for mingw versions which don't provide this in float.h */
+#ifndef _MCW_EM
+# define _MCW_EM 0x0008001F /* Error masks */
+# define _MCW_RC 0x00000300 /* Rounding */
+# define _MCW_PC 0x00030000 /* Precision */
+_CRTIMP unsigned int __cdecl _controlfp (unsigned int unNew, unsigned int unMask);
+#endif
+
/*
* This is the master lock used to serialize access to other
* serialization data structures.