cvs: /php4/ext/standard php_rand.h /php4/ext/standard rand.c

From: Date: Wed, 06 Oct 1999 16:35:06 +0000
Subject: cvs: /php4/ext/standard php_rand.h /php4/ext/standard rand.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-5242@lists.php.net to get a copy of this message
andrei Wed Oct 6 12:35:06 1999 EDT Added files: /php4/ext/standard php_rand.h Modified files: /php4/ext/standard rand.c Log: Move random functions related defines into its own header file. Index: php4/ext/standard/rand.c diff -u php4/ext/standard/rand.c:1.6 php4/ext/standard/rand.c:1.7 --- php4/ext/standard/rand.c:1.6 Sat Sep 25 08:09:50 1999 +++ php4/ext/standard/rand.c Wed Oct 6 12:34:36 1999 @@ -19,18 +19,14 @@ | Based on code from: Shawn Cokus <Cokus@math.washington.edu> | +----------------------------------------------------------------------+ */ -/* $Id: rand.c,v 1.6 1999/09/25 12:09:50 sas Exp $ */ +/* $Id: rand.c,v 1.7 1999/10/06 16:34:36 andrei Exp $ */ #include <stdlib.h> #include "php.h" #include "phpmath.h" +#include "php_rand.h" -#ifndef RAND_MAX -#define RAND_MAX (1<<15) - -#endif - /* This is the ``Mersenne Twister'' random number generator MT19937, which generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) @@ -193,13 +189,6 @@ y ^= (y << 15) & 0xEFC60000U; return(y ^ (y >> 18)); } - - -#if HAVE_LRAND48 -#define PHP_RAND_MAX 2147483647 -#else -#define PHP_RAND_MAX RAND_MAX -#endif /* {{{ proto void srand(int seed) Seeds random number generator */

« previous php.version4 (#5242) next »