]> granicus.if.org Git - postgresql/commit
Clean up bogosities in use of random(3) and srandom(3) --- do not assume
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 7 Aug 2000 00:51:42 +0000 (00:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 7 Aug 2000 00:51:42 +0000 (00:51 +0000)
commit9426047021651d8d7b6595c1377aef1909afcacd
tree737356deee745db64bacbdd589f1562ec9398125
parent259489bab7d01b6acc0bdc2c2938ecb22b1f5c8d
Clean up bogosities in use of random(3) and srandom(3) --- do not assume
that RAND_MAX applies to them, since it doesn't.  Instead add a
config.h parameter MAX_RANDOM_VALUE.  This is currently set at 2^31-1
but could be auto-configured if that ever proves necessary.  Also fix
some outright bugs like calling srand() where srandom() is appropriate.
doc/src/sgml/func.sgml
doc/src/sgml/ref/set.sgml
src/backend/optimizer/geqo/geqo_main.c
src/backend/postmaster/postmaster.c
src/backend/utils/adt/float.c
src/backend/utils/adt/misc.c
src/include/config.h.in
src/include/optimizer/geqo_random.h