From: Andrey Hristov Date: Wed, 12 Sep 2007 09:12:56 +0000 (+0000) Subject: Fix stupid error, which happens only on Windows. And we thought this has X-Git-Tag: php-5.2.5RC1~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc34874dc95668dda522ed249cda4a7927cae839;p=php Fix stupid error, which happens only on Windows. And we thought this has been fixed. Now my_thread_end() should be called and there should be no warnings in the error logs of exiting thread, which hasn't deinited, and leaks. --- diff --git a/NEWS b/NEWS index d11eba6032..c41cc85408 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 20??, PHP 5.2.5 +- Fixed missing brackets leading to build warning and error in the log. + Win32 code). (Andrey) - Fixed leaks with mulitple connects on one mysqli object. (Andrey) - Fixed endianness detection on MacOS when building universal binary. (Uwe Schindler, Christian Speich, Tony) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 4f1d81307e..5c97009d52 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -665,7 +665,7 @@ PHP_MINIT_FUNCTION(mysqli) PHP_MSHUTDOWN_FUNCTION(mysqli) { #ifdef PHP_WIN32 - unsigned long client_ver = mysql_get_client_version; + unsigned long client_ver = mysql_get_client_version(); /* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */ if ((client_ver > 50042 && client_ver < 50100) || client_ver > 50122) { mysql_server_end(); diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index 812d6b89d2..bc4ce56bee 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -241,9 +241,10 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry * TSRML #define MYSQLI_RETURN_LONG_LONG(__val) \ { \ if ((__val) < LONG_MAX) { \ - RETURN_LONG((__val)); \ + RETURN_LONG((long) (__val)); \ } else { \ char *ret; \ + /* always used with my_ulonglong -> %llu */ \ int l = spprintf(&ret, 0, "%llu", (__val)); \ RETURN_STRINGL(ret, l, 0); \ } \