From 96763e8372497ddf6ee725f194b142a7534e777d Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Sun, 16 Sep 2001 17:37:19 +0000 Subject: [PATCH] Hopefully fix compile warnings on win32 systems --- ext/standard/rand.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 50f09e2e4c..e68acad46f 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -24,9 +24,14 @@ #include +#ifdef PHP_WIN32 +#include +#endif + #include "php.h" #include "php_math.h" #include "php_rand.h" +#include "php_lcg.h" #include "basic_functions.h" @@ -192,7 +197,11 @@ PHPAPI php_uint32 php_mt_rand(TSRMLS_D) return y ^ (y >> 18); } +#ifdef PHP_WIN32 +#define GENERATE_SEED() (time(0) * GetCurrentProcessId() * 1000000 * php_combined_lcg(TSRMLS_C)) +#else #define GENERATE_SEED() (time(0) * getpid() * 1000000 * php_combined_lcg(TSRMLS_C)) +#endif /* {{{ proto void srand([int seed]) Seeds random number generator */ -- 2.40.0