diff options
Diffstat (limited to 'ext/standard/php_rand.h')
-rw-r--r-- | ext/standard/php_rand.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index dd41c57d88..bbdf16d385 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ @@ -42,19 +42,19 @@ #endif #define RAND_RANGE(__n, __min, __max, __tmax) \ - (__n) = (__min) + (php_int_t) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0))) + (__n) = (__min) + (zend_long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0))) /* MT Rand */ -#define PHP_MT_RAND_MAX ((php_int_t) (0x7FFFFFFF)) /* (1<<31) - 1 */ +#define PHP_MT_RAND_MAX ((zend_long) (0x7FFFFFFF)) /* (1<<31) - 1 */ #ifdef PHP_WIN32 -#define GENERATE_SEED() (((php_int_t) (time(0) * GetCurrentProcessId())) ^ ((php_int_t) (1000000.0 * php_combined_lcg(TSRMLS_C)))) +#define GENERATE_SEED() (((zend_long) (time(0) * GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #else -#define GENERATE_SEED() (((php_int_t) (time(0) * getpid())) ^ ((php_int_t) (1000000.0 * php_combined_lcg(TSRMLS_C)))) +#define GENERATE_SEED() (((zend_long) (time(0) * getpid())) ^ ((zend_long) (1000000.0 * php_combined_lcg(TSRMLS_C)))) #endif -PHPAPI void php_srand(php_int_t seed TSRMLS_DC); -PHPAPI php_int_t php_rand(TSRMLS_D); +PHPAPI void php_srand(zend_long seed TSRMLS_DC); +PHPAPI zend_long php_rand(TSRMLS_D); PHPAPI void php_mt_srand(php_uint32 seed TSRMLS_DC); PHPAPI php_uint32 php_mt_rand(TSRMLS_D); |