From: Florian Forster Date: Mon, 22 Jan 2007 09:56:10 +0000 (+0100) Subject: src/collectd.h: Include `math.h' and try to force it to define `NAN'. X-Git-Tag: collectd-4.0.0-rc4~136 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d6c0f70908b5f65d1a3673dbe6fd9b81aab49f9;p=collectd.git src/collectd.h: Include `math.h' and try to force it to define `NAN'. --- diff --git a/src/collectd.h b/src/collectd.h index 3c8d3516..c05b3e7b 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -100,6 +100,20 @@ # define assert(...) /* nop */ #endif +/* + * This weird macro cascade forces the glibc to define `NAN'. I don't know + * another way to solve this, so more intelligent solutions are welcome. -octo + */ +#ifndef __USE_ISOC99 +# define DISABLE__USE_ISOC99 1 +# define __USE_ISOC99 1 +#endif +#include +#ifdef DISABLE__USE_ISOC99 +# undef DISABLE__USE_ISOC99 +# undef __USE_ISOC99 +#endif + #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name)