diff options
author | Andi Gutmans <andi@php.net> | 2000-04-22 15:44:35 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-04-22 15:44:35 +0000 |
commit | 5da62dd57e31ed51f9879a6cf31143088ed0a8fc (patch) | |
tree | 0edc77710f40f04c4a0374df47ab5abaf69cf4fa | |
parent | 44908999a8cacfe016a885e645f8a0f6be9ac7ce (diff) | |
download | php-git-5da62dd57e31ed51f9879a6cf31143088ed0a8fc.tar.gz |
- In Windows RAND_MAX is defined in stdlib.h
- Get rid of comment which is confusing.
-rw-r--r-- | ext/standard/php_rand.h | 2 | ||||
-rw-r--r-- | ext/standard/rand.c | 1 |
2 files changed, 2 insertions, 1 deletions
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 <stdlib.h> + #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) |