cvs: php4 /ext/standard math.c rand.c

From: Date: Tue, 18 Sep 2001 05:48:50 +0000
Subject: cvs: php4 /ext/standard math.c rand.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7456@lists.php.net to get a copy of this message
sterling Tue Sep 18 01:48:50 2001 EDT Modified files: /php4/ext/standard math.c rand.c Log: hopefully fix win32 compile warnings # I really wish i had a box to compile php with win32 on Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.57 php4/ext/standard/math.c:1.58 --- php4/ext/standard/math.c:1.57 Sun Sep 9 09:29:18 2001 +++ php4/ext/standard/math.c Tue Sep 18 01:48:49 2001 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.57 2001/09/09 13:29:18 derick Exp $ */ +/* $Id: math.c,v 1.58 2001/09/18 05:48:49 sterling Exp $ */ #include "php.h" #include "php_math.h" @@ -733,7 +733,7 @@ if(!f_mode && (!mult || digit > LONG_MAX/mult || num > LONG_MAX-mult*digit)) { f_mode = 1; if(!mult) { - fmult = ULONG_MAX + 1; + fmult = ULONG_MAX + (ulong) 1; } else { fmult = (unsigned long)mult; } Index: php4/ext/standard/rand.c diff -u php4/ext/standard/rand.c:1.54 php4/ext/standard/rand.c:1.55 --- php4/ext/standard/rand.c:1.54 Sun Sep 16 16:49:57 2001 +++ php4/ext/standard/rand.c Tue Sep 18 01:48:49 2001 @@ -20,7 +20,7 @@ | Based on code from: Shawn Cokus <Cokus@math.washington.edu> | +----------------------------------------------------------------------+ */ -/* $Id: rand.c,v 1.54 2001/09/16 20:49:57 sterling Exp $ */ +/* $Id: rand.c,v 1.55 2001/09/18 05:48:49 sterling Exp $ */ #include <stdlib.h> @@ -250,9 +250,9 @@ /* }}} */ #ifdef PHP_WIN32 -#define GENERATE_SEED() (time(0) * GetCurrentProcessId() * 1000000 * php_combined_lcg(TSRMLS_C)) +#define GENERATE_SEED() ((long) (time(0) * GetCurrentProcessId() * 1000000 * php_combined_lcg(TSRMLS_C))) #else -#define GENERATE_SEED() (time(0) * getpid() * 1000000 * php_combined_lcg(TSRMLS_C)) +#define GENERATE_SEED() ((long) (time(0) * getpid() * 1000000 * php_combined_lcg(TSRMLS_C))) #endif /* {{{ proto void srand([int seed])

« previous php.cvs (#7456) next »