Andre Majorel <[EMAIL PROTECTED]> writes: > On 2001-12-15 07:37 +0100, Hrvoje Niksic wrote: > >> Is there a good fallback value of RAND_MAX for systems that don't >> bother to define it? > > The standard (SUS2) says : > > The value of the {RAND_MAX} macro will be at least 32767.
c9x says the same, but there is a subtle difference between statement and the information I actually need. A SUS-conformant system will not present a problem because it will define RAND_MAX anyway. The information I need is what RAND_MAX should fall back to on the "traditional" Unix systems that have rand(), but don't bother to define RAND_MAX. Online SunOS manuals are not very helpful -- the one at <http://www.freebsd.org/cgi/man.cgi?query=rand&sektion=3&manpath=SunOS+4.1.3> can't even seem to decide whether RAND_MAX is 2^31-1 or 2^15-1, and there is no mention of RAND_MAX or of an include file that might define it.