From: Andi Gutmans Date: Sat, 22 Apr 2000 15:44:35 +0000 (+0000) Subject: - In Windows RAND_MAX is defined in stdlib.h X-Git-Tag: php-4.0RC2~260 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5da62dd57e31ed51f9879a6cf31143088ed0a8fc;p=php - In Windows RAND_MAX is defined in stdlib.h - Get rid of comment which is confusing. --- diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index 01db58d0e1..add0a651ea 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -24,6 +24,8 @@ #ifndef _PHP_RAND_H #define _PHP_RAND_H +#include + #ifndef RAND_MAX #define RAND_MAX (1<<15) #endif diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 9ba1ca9c85..c3aa9917c6 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -92,7 +92,6 @@ #define loBits(u) ((u) & 0x7FFFFFFFU) /* mask the highest bit of u */ #define mixBits(u, v) (hiBit(u)|loBits(v)) /* move hi bit of u to hi bit of v */ -/* Could be 1<<32 but for some reason it has been used as 1<<31 in the past */ #define MT_RAND_MAX ((unsigned long)((1<<31)-1)) static void seedMT(php_uint32 seed BLS_DC)