diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-11-13 22:05:24 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-11-13 22:05:24 +0100 |
commit | f2f9810e4005a46af4c80a95642aad73c31c0451 (patch) | |
tree | bc5c617a0c5cb5397f86df90d4080b1fe1b95a4f /tests/misc.c | |
parent | 9634965957ef9b0c13eeff5fcde65ce64e740816 (diff) | |
download | gmp-f2f9810e4005a46af4c80a95642aad73c31c0451.tar.gz |
* tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
available (eg. mingw).
Diffstat (limited to 'tests/misc.c')
-rw-r--r-- | tests/misc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/misc.c b/tests/misc.c index 164b2f609..872934ca5 100644 --- a/tests/misc.c +++ b/tests/misc.c @@ -87,12 +87,13 @@ tests_rand_start (void) struct timeval tv; gettimeofday (&tv, NULL); seed = tv.tv_sec + tv.tv_usec; - gmp_randseed_ui (rands, seed); - printf ("Seed GMP_CHECK_RANDOMIZE=%lu (include this in bug reports)\n", seed); #else - printf ("tests_rand_start(): Oops, gettimeofday() not available\n"); - abort (); + time_t tv; + time (&tv); + seed = tv; #endif + gmp_randseed_ui (rands, seed); + printf ("Seed GMP_CHECK_RANDOMIZE=%lu (include this in bug reports)\n", seed); } } } |