{
/* Compute a random seed */
(void)seedDrand01((Rand_seed_t)seed());
- PL_srand_called = TRUE;
myseed = (UV)(Drand01() * (NV)UV_MAX);
#if RANDBITS < (UVSIZE * 8)
/* Since there are not enough randbits to to reach all
myseed +=
(UV)(Drand01() * (NV)((1 << ((UVSIZE * 8 - RANDBITS))) - 1));
#endif /* RANDBITS < (UVSIZE * 8) */
- while (myseed == 0) /* Superparanoia. */
- myseed += (UV)(Drand01() * (NV)UV_MAX);
+ if (myseed == 0) { /* Superparanoia. */
+ myseed = (UV)(Drand01() * (NV)UV_MAX); /* One more chance. */
+ if (myseed == 0)
+ Perl_croak(aTHX_ "Your random numbers are not that random");
+ }
}
- PL_hash_seed_set = TRUE;
+ PL_rehash_seed_set = TRUE;
return myseed;
}