[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setdest, Calcdest
On Tue, 04 May 1999 22:49:40 EDT, Juana Elias Nakfour wrote:
>Hi everyone,
> After successfully compiling both setdest.cc and calcdest.cc I had
>trouble running them on solaris. Both files are looking for a /dev/random
>file which does not exist. And this is needed to initialize the random
>generator.... I really appreciate some help !! Thanks !!
Setdest and calcdest don't seem to be very portable---it looks
like they rely on linux specific features.
- <err.h> and err() which should be replaced with the
more verbose (but more portable) fprintf(stderr,....)
- the code in init() which
initializes their random number generator
depends on /dev/random and the random/initstate
library calls, neither of which are portable.
This code could be replaced by calls to the ns random number
generator (in rng.{cc,h}). (There will be some loss
in the quality of the RNG, but a big gain in portability.)
Juana, if you have patches to fix these, or if the CMU/Monarch folks
have improved this code's portability since we picked it up, please
let us know so we can get more portable code.
Thanks,
-John Heidemann