[collectd] collectd 4.6.1 make fails on FreeBSD

Sergey Vinogradov boogie at lazybytes.org
Sat May 2 13:30:33 CEST 2009


Florian Forster пишет:
> Hi all,
> 
> first off: Thanks to Ulf for providing a FreeBSD test system :)
> 
> On Sun, Apr 19, 2009 at 12:45:55AM -0700, Ulf Zimmermann wrote:
>>>> client.c: In function 'lcc_putval':
>>>> client.c:752: warning: implicit declaration of function 'isnanf'
>>>> client.c:752: warning: incompatible implicit declaration of built-in function 'isnanf'
> 
> There are two `isnan' functions: `isnan (double)' and `isnanf (float)'.
> The former is part of C99 and X/Open 6, the latter is a BSD extension.
> 
> Because `client.c' tries to be as standard-conforming as possible,
> `isnanf' is not declared for it. This would be fine, if `isnan' wasn't
> declared as this macro:
>   #define isnan(x)                                        \
>       ((sizeof (x) == sizeof (float)) ? isnanf(x)         \
>       : (sizeof (x) == sizeof (double)) ? isnan(x)        \
>       : __isnanl(x))
> 
> This macro tries to determine which type of value is passed in, float,
> double or long double, and calls `isnanf', `isnan' or `__isnanl'
> accordingly. This follows C99, which says that “the determination is
> based on the type of the argument”.
> 
> Disabling standards conformance seems to avoid this problem, but I'm
> fairly sure this is a bug in FreeBSD's libc. Does anyone of you know
> where to report a (potential) bug like this?
> 
> Regards,
> -octo
То freebsd-standards at freebsd.org mailing list, I suppose.

-- 
wbr,
Boo



More information about the collectd mailing list