cvs: php4 /ext/standard rand.c
| From: | Sterling Hughes | Date: | Thu, 06 Sep 2001 06:41:17 +0000 |
| Subject: | cvs: php4 /ext/standard rand.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7241@lists.php.net to get a copy of this message | ||
sterling Thu Sep 6 02:41:17 2001 EDT
Modified files:
/php4/ext/standard rand.c
Log:
fix ms compile warnings
Index: php4/ext/standard/rand.c
diff -u php4/ext/standard/rand.c:1.46 php4/ext/standard/rand.c:1.47
--- php4/ext/standard/rand.c:1.46 Wed Sep 5 20:40:02 2001
+++ php4/ext/standard/rand.c Thu Sep 6 02:41:16 2001
@@ -19,7 +19,7 @@
| Based on code from: Shawn Cokus <Cokus@math.washington.edu> |
+----------------------------------------------------------------------+
*/
-/* $Id: rand.c,v 1.46 2001/09/06 00:40:02 sterling Exp $ */
+/* $Id: rand.c,v 1.47 2001/09/06 06:41:16 sterling Exp $ */
#include <stdlib.h>
@@ -245,7 +245,7 @@
* -RL
*/
#define RAND_RANGE(__n, __min, __max) \
- (__n) = (__min) + (int)((double)(__max) - (__min) + 1.0) * ((__n) / (PHP_RAND_MAX + 1.0))
+ (__n) = (__min) + (long) ((double) ((__max) - (__min) + 1.0)) * ((__n) / (PHP_RAND_MAX + 1.0))
/* {{{ proto int rand([int min, int max])
Returns a random number */