[rrd-developers] [PATCH] use rrd_random() for PRNG

kevin brintnall kbrint at rufus.net
Mon Apr 13 17:11:28 CEST 2009


On Mon, Apr 13, 2009 at 04:58:12PM +0200, Sebastian Harl wrote:
> Hi Kevin,
> 
> On Sun, Apr 12, 2009 at 03:57:44AM -0500, kevin brintnall wrote:
> > diff --git a/src/librrd.sym.in.in b/src/librrd.sym.in.in
> > index b4e8484..0a7a699 100644
> > --- a/src/librrd.sym.in.in
> > +++ b/src/librrd.sym.in.in
> > @@ -32,6 +32,7 @@ rrd_new_context
> >  rrd_open
> >  rrd_parsetime
> >  rrd_proc_start_end
> > +rrd_random
> >  rrd_read
> >  rrd_resize
> >  rrd_restore
> 
> > diff --git a/src/rrd_tool.h b/src/rrd_tool.h
> > index f58cd78..ddcd2a9 100644
> > --- a/src/rrd_tool.h
> > +++ b/src/rrd_tool.h
> > @@ -119,6 +119,8 @@ int rrd_fetch_fn_libdbi(char *filename, enum cf_en cf_idx,
> >      char *a,
> >      char *b);
> >  
> > +    long rrd_random(void);
> > +
> >  #endif /* _RRD_TOOL_H */
> >  
> >  #ifdef  __cplusplus
> 
> Why did you include rrd_random in librrd.sym (which tells the compiler
> to export that symbol) but then added the definition to rrd_tool.h which
> is supposed to be a "private" header?

I don't intend that any third party callers would invoke it..  It's
exported because rrdcached also needs that symbol.  You're probably right
- we should put it into a public header instead.

-- 
 kevin brintnall =~ /kbrint at rufus.net/



More information about the rrd-developers mailing list