]> granicus.if.org Git - php/commitdiff
hopefully fix win32 compile warnings
authorSterling Hughes <sterling@php.net>
Tue, 18 Sep 2001 05:48:49 +0000 (05:48 +0000)
committerSterling Hughes <sterling@php.net>
Tue, 18 Sep 2001 05:48:49 +0000 (05:48 +0000)
# I really wish i had a box to compile php with win32 on

ext/standard/math.c
ext/standard/rand.c

index 5651eb31ff8b57bf92fde0eb7cb1c0dc75f28216..f0c8d81e1e91045b1f9e40ddd68e691d28930a3d 100644 (file)
@@ -733,7 +733,7 @@ _php_math_basetozval(zval *arg, int base, zval *ret) {
                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 5d0f310064c7d3903db9a16bdb8704ca5d980941..e7cbac399db9f749669ae5f49ac97d08ddf462cd 100644 (file)
@@ -250,9 +250,9 @@ PHPAPI php_uint32 php_mt_rand(TSRMLS_D)
 /* }}} */
 
 #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])