Bakul Shah writes:
> Note that it is rand() that is broken, not random() as can be
> seen by modifying Kris Kennaways' test so I don't see why
> Mark Murray was talking about changing it in the first place.

rand(3) says:

STANDARDS
     The rand() and srand() functions conform to ISO/IEC 9899:1990
     (``ISO C89'').

rand(3) does not specify an exact algorithm (the man page does, but
not the standard).  random(3) has no such standardisation.

Any code that assumes particular constants is _broken_[1]. If it
has been recompiled or if it is dynamically linked against a shared
library other than the one it was tested aginst, different results
are a _feature_.

M

[1] no nitpicking on INT_MAX, please.
--
Mark Murray
iumop ap!sdn w,I idlaH

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to