>>> On 4/1/2008 at 10:28 PM, in message <[EMAIL PROTECTED]>, Carlo Marcelo Arenas Belon <[EMAIL PROTECTED]> wrote: > On Tue, Apr 01, 2008 at 08:32:49AM -0600, Brad Nicholes wrote: >> >>> On 3/31/2008 at 9:48 PM, in message <[EMAIL PROTECTED]>, Carlo >> Marcelo Arenas Belon <[EMAIL PROTECTED]> wrote: >> > On Mon, Mar 31, 2008 at 06:31:46PM -0600, Brad Nicholes wrote: >> >> >> >> I have checked in the code that removes APR from all of the public header >> > files except for gm_metric.h which is needed by the modules. Everything > else >> > should be APR-free. This includes libmetrics, gmetric, gmetad, gstat and >> > gexec. They may still be indirectly using APR through libganglia, but the >> > apr headers aren't required to build them. >> > >> > nice work, any reason why gm_metric.h doesn't include ganglia.h instead of >> > including only the pieces? >> > >> > Index: gm_metric.h >> > =================================================================== >> > --- gm_metric.h (revision 1177) >> > +++ gm_metric.h (working copy) >> > @@ -1,11 +1,9 @@ >> > #ifndef GM_METRIC_H >> > #define GM_METRIC_H 1 >> > -#include <rpc/rpc.h> >> > >> > #include "gm_mmn.h" >> > -#include "gm_protocol.h" >> > #include "gm_value.h" >> > -#include "gm_msg.h" >> > +#include "ganglia.h" >> > >> > #include <confuse.h> /* header for libconfuse */ >> > #include <apr.h> >> >> The way things kind of fell out was that ganglia.h would be included by > utility type applications such as gmetric, gstat, etc. that need the > interfaces to libganglia. > > ok, but then if the application also has a need to access the metric data > (like gmond) then we will end up including gm_protocol.h twice, and that > will lead to redefined symbols (that headers is generated by rpcgen and > might not have protection against multiple inclusion) >
No, rpcgen does the right thing in the header to make sure that it doesn't get included multiple time. #ifndef _GM_PROCOTOL_H_RPCGEN #define _GM_PROCOTOL_H_RPCGEN ... #endif >> Metric modules would include gm_metric.h to get just the metric module > related stuff. Metric modules don't really need all of the libganglia > prototypes. > > but since they are most likely to use at least the debug and error message > prototypes it shouldn't be a problem to include it. > gm_metric.h already includes gm_msg.h so there shouldn't be any problem there either. Brad ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
