From e0b3aa9ba8254ab29d86b294553a5413b7efa59a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 4 Feb 2010 13:07:06 +0100 Subject: [PATCH] src/collectd.h: Add fallback implementations of "isfinite" and "isinf". --- src/collectd.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/collectd.h b/src/collectd.h index 3d8998fd..957654bc 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -135,6 +135,12 @@ typedef bool _Bool; # ifndef isnan # define isnan(f) ((f) != (f)) # endif /* !defined(isnan) */ +# ifndef isfinite +# define isfinite(f) (((f) - (f)) == 0.0) +# endif +# ifndef isinf +# define isinf(f) (!isfinite(f) && !isnan(f)) +# endif #endif /* NAN_ZERO_ZERO */ /* Try really, really hard to determine endianess. Under NexentaStor 1.0.2 this -- 2.30.2