From 94cc8f1e31ac428f8ef7de2f8e10d55ea6c33c2d Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 10 Aug 2006 07:46:22 +0000 Subject: [PATCH] it seems some headers have nan predefined ... so lets just use other variable names git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@867 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/acinclude.m4 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/program/acinclude.m4 b/program/acinclude.m4 index a4c7d228..d0f8c0e8 100644 --- a/program/acinclude.m4 +++ b/program/acinclude.m4 @@ -392,21 +392,21 @@ AC_CACHE_VAL([rd_cv_ieee_$2], #include int main(void){ - double nan,inf,c,zero; + double rrdnan,rrdinf,rrdc,rrdzero; $4; /* some math to see if we get a floating point exception */ - zero=sin(0.0); /* don't let the compiler optimize us away */ - nan=0.0/zero; /* especially here */ - inf=1.0/zero; /* and here. I want to know if it can do the magic */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ /* at run time without sig fpe */ - c = inf + nan; - c = inf / nan; - if (! isnan(nan)) {printf ("not isnan(NaN) ... "); return 1;} - if (nan == nan) {printf ("nan == nan ... "); return 1;} - if (! isinf(inf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-inf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! inf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -inf < 0) {printf ("not -inf < 0 ... "); return 1;} + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} return 0; }]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])]) dnl these we run regardles is cached or not -- 2.30.2