cvs: php-src(PHP_4_3) / NEWS /ext/standard php_rand.h
| From: | Jani Taskinen | Date: | Mon, 19 Jan 2004 02:31:20 +0000 |
| Subject: | cvs: php-src(PHP_4_3) / NEWS /ext/standard php_rand.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-25735@lists.php.net to get a copy of this message | ||
sniper Sun Jan 18 21:31:20 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/standard php_rand.h
Log:
MFH: - Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled)
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.530 php-src/NEWS:1.1247.2.531
--- php-src/NEWS:1.1247.2.530 Fri Jan 16 19:01:04 2004
+++ php-src/NEWS Sun Jan 18 21:31:18 2004
@@ -1,6 +1,7 @@
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
Index: php-src/ext/standard/php_rand.h
diff -u php-src/ext/standard/php_rand.h:1.19.4.4 php-src/ext/standard/php_rand.h:1.19.4.5
--- php-src/ext/standard/php_rand.h:1.19.4.4 Wed Aug 20 12:40:46 2003
+++ php-src/ext/standard/php_rand.h Sun Jan 18 21:31:19 2004
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <Cokus@math.washington.edu> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_rand.h,v 1.19.4.4 2003/08/20 16:40:46 iliaa Exp $ */
+/* $Id: php_rand.h,v 1.19.4.5 2004/01/19 02:31:19 sniper Exp $ */
#ifndef PHP_RAND_H
#define PHP_RAND_H
@@ -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