[rrd-developers] Re: Warnings at compile time

Alex van den Bogaerdt alex at ergens.op.HET.NET
Mon Apr 1 00:15:09 MEST 2002


Peter Speck wrote:

> > - A zillion warnings are a result of global variables y0,y1 and gamma
> >   defined while including <math.h> (which includes <bits/mathcalls.h>)
> 
> A have those warnings on Mac OS X but not on Solaris 2.6, so it seems to 
> be platform specific. Which version of (g)cc does you use, and what 
> platform?

gcc 2.96 (I know; don't say it) on RH (obviously) 7.1 kernel 2.4.9-31

Short explanation:  Any system V or BSD compatible system should suffer
from this.  Long explanation:

What happens is this:
In <features.h> it is decided to do a few defines:
   (...) the default is to have _SVID_SOURCE,
   _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
   199506L. 

It defines __USE_MISC if either _BSD_SOURCE or _SVID_SOURCE is defined.

In <math.h> a test for either __USE_MISC or __USE_ISOC99 results
in the inclusion of <bits/mathcalls.h> which in its turn checks for
either __USE_MISC or __USE_XOPEN and then decides to define y0, y1
and yn as "Bessel functions".
A little bit furtheron an "Obsolete alias for `lgamma'." is defined.

The solution seems simple: don't define _SVID_SOURCE and as a result
__USE_MISC isn't defined.  While this does indeed solves the problem
it also results in many other problems.

This is why I think it may be less problematic to either remove the
warning in Makefile (not my preferred option) or to change the names
of y0,y1,gamma and probably index.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list