summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:11:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:11:21 (GMT)
commitc1a2e7bde2cd53a94dec88be3f20322426bd88c8 (patch)
treef6058f3b8f15b685b61d6c42c1904547b065c57f /win
parent3f287b172483efb85cfdf6b3685fe44c9897abcf (diff)
parente82b21ebc983b5f43ad7a4e9d0d90c47e2cbe73b (diff)
downloadtcl-c1a2e7bde2cd53a94dec88be3f20322426bd88c8.zip
tcl-c1a2e7bde2cd53a94dec88be3f20322426bd88c8.tar.gz
tcl-c1a2e7bde2cd53a94dec88be3f20322426bd88c8.tar.bz2
Workaround for mingw versions which don't provide _fpcontrol in float.h
Diffstat (limited to 'win')
-rw-r--r--win/tclWinThrd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 96c8894..50e8ace 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -15,6 +15,14 @@
#include <float.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.