]> granicus.if.org Git - php/commitdiff
- Fix for bug #8535 - floating point exception on FreeBSD while initializing
authorDerick Rethans <derick@php.net>
Mon, 8 Jan 2001 21:13:24 +0000 (21:13 +0000)
committerDerick Rethans <derick@php.net>
Mon, 8 Jan 2001 21:13:24 +0000 (21:13 +0000)
  crypt random numbers

ext/standard/crypt.c

index aa10020bee5bf0f1d42351a97d8eb553a6cd1712..d4cc55b43cd5b518a1f66030846adf78afc82f20 100644 (file)
@@ -106,7 +106,7 @@ PHP_MINIT_FUNCTION(crypt)
        REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", PHP_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT);
 
 #if HAVE_SRAND48
-       srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));
+       srand48((long) time(0) * (long) getpid() * (long) (php_combined_lcg() * 10000.0));
 #elif HAVE_SRANDOM
        srandom((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));
 #else