On Wed, 22 Jul 2009, Don Armstrong wrote: > On Wed, 22 Jul 2009, Damyan Ivanov wrote: > > I believe the patch Don is about to send will require smaller > > changes. Having some conditional code would be nice so that it > > doesn't break 5.8 installs, but that's it. Then we forward it > > upstream and let them decide. > > Attached is the fairly trivial change to do this.
Updated now to work on 32 bit architectures properly. Don Armstrong -- Your village called. They want their idiot back. -- xkcd http://xkcd.com/c23.html http://www.donarmstrong.com http://rzlab.ucr.edu
diff -u libmath-random-perl-0.71/debian/changelog libmath-random-perl-0.71/debian/changelog --- libmath-random-perl-0.71/debian/changelog +++ libmath-random-perl-0.71/debian/changelog @@ -1,3 +1,10 @@ +libmath-random-perl (0.71-1.1) unstable; urgency=low + + * Non-maintainer upload. + * new seedall XS function to seed using Perl_seed() (closes: #537952) + + -- Don Armstrong <[email protected]> Wed, 22 Jul 2009 02:46:31 -0700 + libmath-random-perl (0.71-1) unstable; urgency=low * Initial Release (Closes: #505182). only in patch2: unchanged: --- libmath-random-perl-0.71.orig/Random.xs +++ libmath-random-perl-0.71/Random.xs @@ -210,6 +210,20 @@ setall(iseed1,iseed2); OUTPUT: +void +seedall () + PROTOTYPE: + CODE: +{ + /* For whatever reason, the random seeds need to be in 1..2^30; the + below will be uniformly distributed assuming the seed value is + uniformly distributed */ + setall((long)(Perl_seed(aTHX) % 1073741824L), + (long)(Perl_seed(aTHX) % 1073741824L) + ); +} + OUTPUT: + double gvprfw (index) INPUT: only in patch2: unchanged: --- libmath-random-perl-0.71.orig/Random.pm +++ libmath-random-perl-0.71/Random.pm @@ -73,7 +73,8 @@ ### set seeds by default -salfph(scalar(localtime())); +#salfph(scalar(localtime())); +seedall(); ##################################################################### # RANDOM DEVIATE GENERATORS #

