[collectd] collectd 4.6.1 make fails on FreeBSD

Florian Forster octo at verplant.org
Sat May 2 11:22:23 CEST 2009


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
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090502/89611bfb/attachment.pgp 


More information about the collectd mailing list