PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2004, Version 4.3.5
+- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled). (Jani)
- Fixed bug #26937 (Warning in xml.c). (Jani)
- Fixed Bug #26927 (preg_quote() does not escape \0). (Ilia)
- Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as
#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