Code

call fpclass only once when replacing isnan for solaris
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 24 Aug 2009 12:02:32 +0000 (12:02 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 24 Aug 2009 12:02:32 +0000 (12:02 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1904 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_config_bottom.h

index d04e592af13f56088cc10d88509201713506b934..a569197ab9a8b709f0135895ad88b60248648852 100644 (file)
@@ -175,7 +175,8 @@ char *strchr (), *strrchr ();
 #  ifdef isinf
 #  undef isinf
 #  endif
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#  define isinf(a) (!!(fpclass(a) & (FP_SNAN|FP_QNAN)))
+
 #endif
 
 /* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */