projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdb6736
)
src/collectd.h: Add fallback implementations of "isfinite" and "isinf".
author
Florian Forster
<octo@huhu.verplant.org>
Thu, 4 Feb 2010 12:07:06 +0000
(13:07 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Thu, 4 Feb 2010 12:07:06 +0000
(13:07 +0100)
src/collectd.h
patch
|
blob
|
history
diff --git
a/src/collectd.h
b/src/collectd.h
index
3d8998f
..
957654b
100644
(file)
--- 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