mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled)
This commit is contained in:
parent
8ee117f877
commit
c7f8c84f36
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@
|
|||
#define RAND_MAX (1<<15)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LRAND48) || defined(HAVE_RANDOM)
|
||||
/* In ZTS mode we rely on rand_r() so we must use RAND_MAX. */
|
||||
#if !defined(ZTS) && (defined(HAVE_LRAND48) || defined(HAVE_RANDOM))
|
||||
#define PHP_RAND_MAX 2147483647
|
||||
#else
|
||||
#define PHP_RAND_MAX RAND_MAX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue