#include <stdlib.h>
+#ifdef PHP_WIN32
+#include <windows.h>
+#endif
+
#include "php.h"
#include "php_math.h"
#include "php_rand.h"
+#include "php_lcg.h"
#include "basic_functions.h"
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 */