From: ellson Date: Fri, 23 Dec 2005 16:28:34 +0000 (+0000) Subject: janitor - clean up some warnings and move -DNO_FPERR to config.h X-Git-Tag: LAST_LIBGRAPH~32^2~6909 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ea1340c3d318d08e48dab3602da00dee9eaaca5;p=graphviz janitor - clean up some warnings and move -DNO_FPERR to config.h --- diff --git a/cmd/dot/dot.c b/cmd/dot/dot.c index 702c6ffdf..d0b94cf26 100644 --- a/cmd/dot/dot.c +++ b/cmd/dot/dot.c @@ -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 #elif HAVE_FPU_CONTROL_H # include @@ -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) { diff --git a/configure.ac b/configure.ac index 6196a63ce..370d8bfc9 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -----------------------------------