summaryrefslogtreecommitdiffstats
path: root/win/tclWinThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:12:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-14 09:12:17 (GMT)
commit47871a70f2f72a07a20bcf8ab3826068bf227392 (patch)
tree5c540f748346d27d74b0ae70b30a4ca260ca00a7 /win/tclWinThrd.c
parent79f0dd04b938d8af8c2a5dd20c50b5f2f9d7e334 (diff)
parentc1a2e7bde2cd53a94dec88be3f20322426bd88c8 (diff)
downloadtcl-47871a70f2f72a07a20bcf8ab3826068bf227392.zip
tcl-47871a70f2f72a07a20bcf8ab3826068bf227392.tar.gz
tcl-47871a70f2f72a07a20bcf8ab3826068bf227392.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 088e9ff..7b0f6f8 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -16,6 +16,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.