diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-28 02:39:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-28 02:39:19 +0100 |
commit | 78426129aa11748aea8696eb9ecc35f911ad55ce (patch) | |
tree | b99e296f677bd1eb857d04b04f385cf6899747ae /gui/init.cpp | |
parent | 0d51e5e9073ff6965b3c80d2e86bd02a0d1db420 (diff) |
gui/init: fix mingw-w64 _controlfp
Diffstat (limited to 'gui/init.cpp')
-rw-r--r-- | gui/init.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gui/init.cpp b/gui/init.cpp index 91522867..e30df777 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -33,6 +33,10 @@ using namespace options; #include <cfloat> #include <cfenv> +#ifdef __MINGW32__ +extern "C" __declspec(dllimport) unsigned __cdecl _controlfp(unsigned, unsigned); +#endif + static void set_fp_mask() { #if defined OTR_ARCH_DENORM_DAZ @@ -50,6 +54,19 @@ static void set_fp_mask() #endif #ifdef _WIN32 +# ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wreserved-id-macro" +# endif +# ifndef _DN_FLUSH +# define _DN_FLUSH 0x01000000 +# endif +# ifndef _MCW_DN +# define _MCW_DN 0x03000000 +# endif +# ifdef __clang__ +# pragma clang diagnostic pop +# endif _controlfp(_DN_FLUSH, _MCW_DN); #endif } |