]> git.mxchange.org Git - flightgear.git/commitdiff
Corrected typo in macro name, and reverse flags -- FPEs really are
authordavid <david>
Sat, 22 Dec 2001 23:16:43 +0000 (23:16 +0000)
committerdavid <david>
Sat, 22 Dec 2001 23:16:43 +0000 (23:16 +0000)
being reported now.

src/Main/main.cxx

index d835bbd482b6966f4b94ff23f2c8ff30dbf6378e..a777195c1b3f6fedb27d859a7749075b5c1413ea 100644 (file)
@@ -25,7 +25,7 @@
 #  include <config.h>
 #endif
 
-#if defined(__linux__) && defined(__386__)
+#if defined(__linux__) && defined(__i386__)
 #  include <fpu_control.h>
 #endif
 
@@ -1774,14 +1774,15 @@ int mainLoop( int argc, char **argv ) {
 int main ( int argc, char **argv ) {
 
     // Enable floating-point exceptions for Linux/x86
-#if defined(__linux__) && defined(__386__)
-    int fpe_flags = 0;
-//      fpe_flags |= _FPU_MASK_IM;     // invalid operation
-//      fpe_flags |= _FPU_MASK_DM;     // denormalized operand
-    fpe_flags |= _FPU_MASK_ZM; // zero-divide
-//      fpe_flags |= _FPU_MASK_OM;     // overflow
-//      fpe_flags |= _FPU_MASK_UM;     // underflow
-//      fpe_flags |= _FPU_MASK_PM;     // precision (inexact result)
+#if defined(__linux__) && defined(__i386__)
+    fpu_control_t fpe_flags;
+    _FPU_GETCW(fpe_flags);
+//      fpe_flags &= ~_FPU_MASK_IM;    // invalid operation
+//      fpe_flags &= ~_FPU_MASK_DM;    // denormalized operand
+    fpe_flags &= ~_FPU_MASK_ZM;        // zero-divide
+//      fpe_flags &= ~_FPU_MASK_OM;    // overflow
+//      fpe_flags &= ~_FPU_MASK_UM;    // underflow
+//      fpe_flags &= ~_FPU_MASK_PM;    // precision (inexact result)
     _FPU_SETCW(fpe_flags);
 #endif