]> granicus.if.org Git - graphviz/commitdiff
janitor - clean up some warnings and move -DNO_FPERR to config.h
authorellson <devnull@localhost>
Fri, 23 Dec 2005 16:28:34 +0000 (16:28 +0000)
committerellson <devnull@localhost>
Fri, 23 Dec 2005 16:28:34 +0000 (16:28 +0000)
cmd/dot/dot.c
configure.ac

index 702c6ffdf5a99be072412f994b8a264e818b9c41..d0b94cf26b78a451d6af4192c2979360ee6b94a3 100644 (file)
@@ -33,7 +33,9 @@
 #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
 /* _GNU_SOURCE is needed for feenableexcept to be defined in fenv.h on GNU
  * systems.   Presumably it will do no harm on other systems. */
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 # include <fenv.h>
 #elif HAVE_FPU_CONTROL_H
 # include <fpu_control.h>
@@ -58,6 +60,7 @@ static void intr(int s)
     exit (gvFreeContext(Gvc));
 }
 
+#ifndef NO_FPERR
 static void fperr(int s)
 {
     fprintf(stderr, "caught SIGFPE %d\n", s);
@@ -106,6 +109,7 @@ static void fpinit(void)
 #endif
 }
 #endif
+#endif
 
 static graph_t *create_test_graph(void)
 {
index 6196a63ce5ea4b63628dc915113a32e39e062028..370d8bfc908d27b2eb9f7c2e564e6a6c1cd267b3 100644 (file)
@@ -196,7 +196,7 @@ 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"
+    AC_DEFINE_UNQUOTED(NO_FPERR,1,[Define if no fpu error exception handling is required.])
 fi
 
 dnl -----------------------------------