[collectd] Standards conformance (was: FreeBSD compile fixes)

Doug MacEachern Doug.MacEachern at hyperic.com
Fri Apr 17 13:44:17 CEST 2009


> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: Friday, April 17, 2009 1:52 AM
> To: Doug MacEachern
> Cc: collectd at verplant.org
> Subject: Re: [collectd] Standards conformance (was: FreeBSD compile
> fixes)
> 
> Hi,
> 
> On Thu, Apr 16, 2009 at 10:59:24PM -0400, Doug MacEachern wrote:
> > Not sure about #2, other ideas?
> 
> I was having problems with that on Solaris, too:
> 
> If I compile with `c99' or `-std=c99', the libc doesn't export
> `snprintf' and `strerror_r' anymore.

I had gotten further with -std=gnu99, but then realized mysql was compiled with sun's cc, not gcc.. I think I saw the same with CC=cc.
 
> If I set
>   _POSIX_C_SOURCE=200112L
> the libc complains that POSIX 2001 *must* be compiled with c99. Hooray
> for standards!
> 
> I think I'll add a configure flag for something like a ‘maintainer
> mode’
> or something, which will
>  - enable all those standard-flags
>  - add "-g -O0" to the CFLAGS
>  - maybe change the default prefix to /tmp/collectd
> 
> If you or anybody else has any comments on how to handle standards
> comformance, I'd love to here 'em :)

Yes, likely best to make the flags optional and off by default.  I think {Open,Net}BSD has similar issues and at some point will see about AIX and HP-UX which are always a treat ;)

> Regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/


More information about the collectd mailing list