]> granicus.if.org Git - graphviz/commitdiff
make FP error trapping conditional on not using -ffast-math
authorellson <devnull@localhost>
Fri, 16 Dec 2005 22:17:23 +0000 (22:17 +0000)
committerellson <devnull@localhost>
Fri, 16 Dec 2005 22:17:23 +0000 (22:17 +0000)
cmd/dot/dot.c
configure.ac

index 6ba014a9bc506dc0b50526e402752b587170a365..7a473952ae15227e50b8f5ff44389b4eb27a05b4 100644 (file)
@@ -104,7 +104,6 @@ static void fpinit(void)
     _FPU_SETCW(fpe_flags);
 # endif
 #endif
-    signal(SIGFPE, fperr);
 }
 #endif
 
@@ -145,7 +144,10 @@ int main(int argc, char **argv)
 #ifndef MSWIN32
     signal(SIGUSR1, gvToggle);
     signal(SIGINT, intr);
+#ifndef NO_FPERR
     fpinit();
+    signal(SIGFPE, fperr);
+#endif
 #endif
 
     if (MemTest) {
index 342d48193b45229d62c3ae6c2bc3c8966369814f..58c87613f2e47f19904617d1967321b6956e7de9 100644 (file)
@@ -193,6 +193,11 @@ else
            ;;
     esac
 fi
+# -ffast-math is incompatible with FP error trapping
+#     ref: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175793
+if `echo ${CFLAGS} | grep -q ffast-math`; then
+    CFLAGS="${CFLAGS} -DNO_FPERR"
+fi
 
 dnl -----------------------------------
 dnl checks for other programs