]> granicus.if.org Git - php/commitdiff
- In Windows RAND_MAX is defined in stdlib.h
authorAndi Gutmans <andi@php.net>
Sat, 22 Apr 2000 15:44:35 +0000 (15:44 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 22 Apr 2000 15:44:35 +0000 (15:44 +0000)
- Get rid of comment which is confusing.

ext/standard/php_rand.h
ext/standard/rand.c

index 01db58d0e1afe7ccfcdf4fc83a40203b3e641390..add0a651eae8bcd227cf1de8b28f59407728e1f6 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef _PHP_RAND_H
 #define        _PHP_RAND_H
 
+#include <stdlib.h>
+
 #ifndef RAND_MAX
 #define RAND_MAX (1<<15)
 #endif
index 9ba1ca9c85af2214f6b855a9adf96978cf463668..c3aa9917c61208975c9ad950f96cea6c26e999ad 100644 (file)
@@ -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)