From 03118d441f03fdaffe90240abe988c9222f438f7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 8 Mar 2016 22:00:16 -0600 Subject: [PATCH] Don't use _FPU_GETCW if it won't do what we want - _FPU_GETCW is defined for more than just x87. Don't use it if the control word for the target architecture doesn't support _FPU_EXTENDED or _FPU_DOUBLE defined, e.g. pretty much anything but x87. If I had been using glibc on PowerPC instead of Apple's libc, I probably would have noticed this sooner, since _FPU_GETCW is part of glibc. --- src/d_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index accb6c247..84e03cdaa 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1973,7 +1973,7 @@ static void D_DoomInit() // Set the FPU precision to 53 significant bits. This is the default // for Visual C++, but not for GCC, so some slight math variances // might crop up if we leave it alone. -#if defined(_FPU_GETCW) +#if defined(_FPU_GETCW) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) { int cw; _FPU_GETCW(cw);