On Fri, Aug 17, 2001 at 09:02:01AM -0700, Justin Erenkrantz wrote: > On Fri, Aug 17, 2001 at 08:30:20AM -0700, Aaron Bannert wrote: > > > Index: config.h.in > > > =================================================================== > > > RCS file: /home/cvs/httpd-test/flood/config.h.in,v > > > retrieving revision 1.13 > > > retrieving revision 1.14 > > > diff -u -r1.13 -r1.14 > > > --- config.h.in 2001/08/14 20:14:50 1.13 > > > +++ config.h.in 2001/08/17 07:44:02 1.14 > > > @@ -57,4 +57,8 @@ > > > #define RANDFILE "@RANDFILE@" > > > #define CAPATH "@CAPATH@" > > > > > > +#define FLOOD_USE_RAND @prngrand@ > > > +#define FLOOD_USE_RAND48 @prngrand48@ > > > +#define FLOOD_USE_RANDOM @prngrandom@ > > > + > > > #endif /* __config_h */ > > > Shouldn't this just be FLOOD_HAS_* by the way you are deciding which > > one to use inside the #ifdef's? I'll post a patch later today. > > > > (I know I know, I'm being picky.) > > I dunno. I think it is a USE because you may have all three, but you > only want to use one of them. I don't think this is a HAS/HAVE > because you may not always use the ones you have. Confusing... > -- justin
Really this should be in APR, but I fear that PRNG is a touchy subject for portability. The problem is that when you're using a PRNG, you usually need to know the operating parameters of the PRNG, like what you ran in to: period, distribution, etc... If we put an abstraction into APR, we may end up with lowest-common-denominator-syndrome, where it becomes less than useful for cases that require specific amounts of entropy. What do you think? -aaron
