andrey Tue Oct 16 20:58:35 2007 UTC
Modified files:
/php-src/ext/mysql php_mysql_structs.h php_mysql.c php_mysql.h
/php-src/ext/mysqlnd config.w32 mysqlnd_debug.c mysqlnd_debug.h
mysqlnd_palloc.c mysqlnd_portability.h
mysqlnd_priv.h
Log:
Sync mysqlnd with HEAD. Same sources as in 5_3
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql_structs.h?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysql/php_mysql_structs.h
diff -u /dev/null php-src/ext/mysql/php_mysql_structs.h:1.2
--- /dev/null Tue Oct 16 20:58:35 2007
+++ php-src/ext/mysql/php_mysql_structs.h Tue Oct 16 20:58:35 2007
@@ -0,0 +1,151 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2007 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | [EMAIL PROTECTED] so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Zeev Suraski <[EMAIL PROTECTED]> |
+ | Andrey Hristov <[EMAIL PROTECTED]> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: php_mysql_structs.h,v 1.2 2007/10/16 20:58:35 andrey Exp $ */
+
+#ifndef PHP_MYSQL_STRUCTS_H
+#define PHP_MYSQL_STRUCTS_H
+
+#ifdef PHP_WIN32
+#define PHP_MYSQL_API __declspec(dllexport)
+#else
+#define PHP_MYSQL_API
+#endif
+
+#if HAVE_MYSQL
+
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#if defined(HAVE_MYSQLND)
+#include "ext/mysqlnd/mysqlnd.h"
+#include "ext/mysql/mysql_mysqlnd.h"
+#else
+#include <mysql.h>
+#endif
+
+#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 50000) ||
MYSQL_VERSION_ID >= 50007 || HAVE_MYSQLND
+#define MYSQL_HAS_SET_CHARSET
+#endif
+
+extern zend_module_entry mysql_module_entry;
+
+#define mysql_module_ptr &mysql_module_entry
+
+PHP_MINIT_FUNCTION(mysql);
+PHP_RINIT_FUNCTION(mysql);
+PHP_MSHUTDOWN_FUNCTION(mysql);
+PHP_RSHUTDOWN_FUNCTION(mysql);
+PHP_MINFO_FUNCTION(mysql);
+
+PHP_FUNCTION(mysql_connect);
+PHP_FUNCTION(mysql_pconnect);
+PHP_FUNCTION(mysql_close);
+PHP_FUNCTION(mysql_select_db);
+#if MYSQL_VERSION_ID < 40000
+PHP_FUNCTION(mysql_create_db);
+PHP_FUNCTION(mysql_drop_db);
+#endif
+PHP_FUNCTION(mysql_query);
+PHP_FUNCTION(mysql_unbuffered_query);
+PHP_FUNCTION(mysql_db_query);
+PHP_FUNCTION(mysql_list_dbs);
+PHP_FUNCTION(mysql_list_tables);
+PHP_FUNCTION(mysql_list_fields);
+PHP_FUNCTION(mysql_list_processes);
+PHP_FUNCTION(mysql_error);
+PHP_FUNCTION(mysql_errno);
+PHP_FUNCTION(mysql_affected_rows);
+PHP_FUNCTION(mysql_insert_id);
+PHP_FUNCTION(mysql_result);
+PHP_FUNCTION(mysql_num_rows);
+PHP_FUNCTION(mysql_num_fields);
+PHP_FUNCTION(mysql_fetch_row);
+PHP_FUNCTION(mysql_fetch_array);
+PHP_FUNCTION(mysql_fetch_assoc);
+PHP_FUNCTION(mysql_fetch_object);
+PHP_FUNCTION(mysql_data_seek);
+PHP_FUNCTION(mysql_fetch_lengths);
+PHP_FUNCTION(mysql_fetch_field);
+PHP_FUNCTION(mysql_field_seek);
+PHP_FUNCTION(mysql_free_result);
+PHP_FUNCTION(mysql_field_name);
+PHP_FUNCTION(mysql_field_table);
+PHP_FUNCTION(mysql_field_len);
+PHP_FUNCTION(mysql_field_type);
+PHP_FUNCTION(mysql_field_flags);
+PHP_FUNCTION(mysql_escape_string);
+PHP_FUNCTION(mysql_real_escape_string);
+PHP_FUNCTION(mysql_get_client_info);
+PHP_FUNCTION(mysql_get_host_info);
+PHP_FUNCTION(mysql_get_proto_info);
+PHP_FUNCTION(mysql_get_server_info);
+PHP_FUNCTION(mysql_info);
+PHP_FUNCTION(mysql_stat);
+PHP_FUNCTION(mysql_thread_id);
+PHP_FUNCTION(mysql_client_encoding);
+PHP_FUNCTION(mysql_ping);
+PHP_FUNCTION(mysql_set_charset);
+
+ZEND_BEGIN_MODULE_GLOBALS(mysql)
+ long default_link;
+ long num_links,num_persistent;
+ long max_links,max_persistent;
+ long allow_persistent;
+ long default_port;
+ char *default_host, *default_user, *default_password;
+ char *default_socket;
+ char *connect_error;
+ long connect_errno;
+ long connect_timeout;
+ long result_allocated;
+ long trace_mode;
+ long allow_local_infile;
+#ifdef HAVE_MYSQLND
+ MYSQLND_THD_ZVAL_PCACHE *mysqlnd_thd_zval_cache;
+ MYSQLND_QCACHE *mysqlnd_qcache;
+ long cache_size;
+#endif
+ZEND_END_MODULE_GLOBALS(mysql)
+
+#ifdef ZTS
+# define MySG(v) TSRMG(mysql_globals_id, zend_mysql_globals *, v)
+#else
+# define MySG(v) (mysql_globals.v)
+#endif
+
+
+#else
+
+#define mysql_module_ptr NULL
+
+#endif
+
+#define phpext_mysql_ptr mysql_module_ptr
+
+#endif /* PHP_MYSQL_STRUCTS_H */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.245&r2=1.246&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.245 php-src/ext/mysql/php_mysql.c:1.246
--- php-src/ext/mysql/php_mysql.c:1.245 Fri Oct 12 07:23:44 2007
+++ php-src/ext/mysql/php_mysql.c Tue Oct 16 20:58:35 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.245 2007/10/12 07:23:44 tony2001 Exp $ */
+/* $Id: php_mysql.c,v 1.246 2007/10/16 20:58:35 andrey Exp $ */
/* TODO:
*
@@ -59,7 +59,7 @@
#endif
#include "php_ini.h"
-#include "php_mysql.h"
+#include "php_mysql_structs.h"
/* True globals, no need for thread safety */
static int le_result, le_link, le_plink;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.h?r1=1.42&r2=1.43&diff_format=u
Index: php-src/ext/mysql/php_mysql.h
diff -u php-src/ext/mysql/php_mysql.h:1.42 php-src/ext/mysql/php_mysql.h:1.43
--- php-src/ext/mysql/php_mysql.h:1.42 Wed Jul 25 23:47:32 2007
+++ php-src/ext/mysql/php_mysql.h Tue Oct 16 20:58:35 2007
@@ -16,133 +16,18 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.h,v 1.42 2007/07/25 23:47:32 jani Exp $ */
+/* $Id: php_mysql.h,v 1.43 2007/10/16 20:58:35 andrey Exp $ */
#ifndef PHP_MYSQL_H
#define PHP_MYSQL_H
-#ifdef PHP_WIN32
-#define PHP_MYSQL_API __declspec(dllexport)
-#else
-#define PHP_MYSQL_API
-#endif
-
#if HAVE_MYSQL
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#if defined(HAVE_MYSQLND)
-#include "ext/mysqlnd/mysqlnd.h"
-#include "ext/mysql/mysql_mysqlnd.h"
-#else
-#include <mysql.h>
-#endif
-
-#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 50000) ||
MYSQL_VERSION_ID >= 50007 || HAVE_MYSQLND
-#define MYSQL_HAS_SET_CHARSET
-#endif
-
extern zend_module_entry mysql_module_entry;
-
#define mysql_module_ptr &mysql_module_entry
-PHP_MINIT_FUNCTION(mysql);
-PHP_RINIT_FUNCTION(mysql);
-PHP_MSHUTDOWN_FUNCTION(mysql);
-PHP_RSHUTDOWN_FUNCTION(mysql);
-PHP_MINFO_FUNCTION(mysql);
-
-PHP_FUNCTION(mysql_connect);
-PHP_FUNCTION(mysql_pconnect);
-PHP_FUNCTION(mysql_close);
-PHP_FUNCTION(mysql_select_db);
-#if MYSQL_VERSION_ID < 40000
-PHP_FUNCTION(mysql_create_db);
-PHP_FUNCTION(mysql_drop_db);
-#endif
-PHP_FUNCTION(mysql_query);
-PHP_FUNCTION(mysql_unbuffered_query);
-PHP_FUNCTION(mysql_db_query);
-PHP_FUNCTION(mysql_list_dbs);
-PHP_FUNCTION(mysql_list_tables);
-PHP_FUNCTION(mysql_list_fields);
-PHP_FUNCTION(mysql_list_processes);
-PHP_FUNCTION(mysql_error);
-PHP_FUNCTION(mysql_errno);
-PHP_FUNCTION(mysql_affected_rows);
-PHP_FUNCTION(mysql_insert_id);
-PHP_FUNCTION(mysql_result);
-PHP_FUNCTION(mysql_num_rows);
-PHP_FUNCTION(mysql_num_fields);
-PHP_FUNCTION(mysql_fetch_row);
-PHP_FUNCTION(mysql_fetch_array);
-PHP_FUNCTION(mysql_fetch_assoc);
-PHP_FUNCTION(mysql_fetch_object);
-PHP_FUNCTION(mysql_data_seek);
-PHP_FUNCTION(mysql_fetch_lengths);
-PHP_FUNCTION(mysql_fetch_field);
-PHP_FUNCTION(mysql_field_seek);
-PHP_FUNCTION(mysql_free_result);
-PHP_FUNCTION(mysql_field_name);
-PHP_FUNCTION(mysql_field_table);
-PHP_FUNCTION(mysql_field_len);
-PHP_FUNCTION(mysql_field_type);
-PHP_FUNCTION(mysql_field_flags);
-PHP_FUNCTION(mysql_escape_string);
-PHP_FUNCTION(mysql_real_escape_string);
-PHP_FUNCTION(mysql_get_client_info);
-PHP_FUNCTION(mysql_get_host_info);
-PHP_FUNCTION(mysql_get_proto_info);
-PHP_FUNCTION(mysql_get_server_info);
-PHP_FUNCTION(mysql_info);
-PHP_FUNCTION(mysql_stat);
-PHP_FUNCTION(mysql_thread_id);
-PHP_FUNCTION(mysql_client_encoding);
-PHP_FUNCTION(mysql_ping);
-PHP_FUNCTION(mysql_set_charset);
-
-ZEND_BEGIN_MODULE_GLOBALS(mysql)
- long default_link;
- long num_links,num_persistent;
- long max_links,max_persistent;
- long allow_persistent;
- long default_port;
- char *default_host, *default_user, *default_password;
- char *default_socket;
- char *connect_error;
- long connect_errno;
- long connect_timeout;
- long result_allocated;
- long trace_mode;
- long allow_local_infile;
-#ifdef HAVE_MYSQLND
- MYSQLND_THD_ZVAL_PCACHE *mysqlnd_thd_zval_cache;
- MYSQLND_QCACHE *mysqlnd_qcache;
- long cache_size;
-#endif
-ZEND_END_MODULE_GLOBALS(mysql)
-
-#ifdef ZTS
-# define MySG(v) TSRMG(mysql_globals_id, zend_mysql_globals *, v)
#else
-# define MySG(v) (mysql_globals.v)
-#endif
-
-
-#else
-
#define mysql_module_ptr NULL
-
#endif
#define phpext_mysql_ptr mysql_module_ptr
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/config.w32?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/mysqlnd/config.w32
diff -u php-src/ext/mysqlnd/config.w32:1.4 php-src/ext/mysqlnd/config.w32:1.5
--- php-src/ext/mysqlnd/config.w32:1.4 Thu Oct 4 11:04:22 2007
+++ php-src/ext/mysqlnd/config.w32 Tue Oct 16 20:58:35 2007
@@ -1,26 +1,20 @@
-// $Id: config.w32,v 1.4 2007/10/04 11:04:22 andrey Exp $
+// $Id: config.w32,v 1.5 2007/10/16 20:58:35 andrey Exp $
// vim:ft=javascript
-ARG_WITH("mysqli", "MySQLi support", "no");
-ARG_ENABLE("mysqlnd", "MySQLi with mysqlnd support", "no");
-
-if (PHP_MYSQLI == "mysqlnd" || PHP_MYSQL == "mysqlnd") {
+mysqld_source = "";
+if (CHECK_LIB("ws2_32.lib", "mysqlnd")) {
mysqlnd_source =
- "mysqlnd.c " +
- "mysqlnd_debug.c " +
- "mysqlnd_charset.c " +
- "mysqlnd_loaddata.c " +
- "mysqlnd_palloc.c " +
- "mysqlnd_ps.c " +
- "mysqlnd_ps_codec.c " +
- "mysqlnd_qcache.c " +
- "mysqlnd_result.c " +
- "mysqlnd_result_meta.c " +
- "mysqlnd_statistics.c " +
- "mysqlnd_wireprotocol.c";
- if (CHECK_LIB("ws2_32.lib", "mysqlnd")) {
- EXTENSION("mysqlnd", mysqlnd_source);
- AC_DEFINE('HAVE_MYSQLND', 1, 'MySQL native driver support enabled');
- }
+ "mysqlnd.c " +
+ "mysqlnd_debug.c " +
+ "mysqlnd_charset.c " +
+ "mysqlnd_loaddata.c " +
+ "mysqlnd_palloc.c " +
+ "mysqlnd_ps.c " +
+ "mysqlnd_ps_codec.c " +
+ "mysqlnd_qcache.c " +
+ "mysqlnd_result.c " +
+ "mysqlnd_result_meta.c " +
+ "mysqlnd_statistics.c " +
+ "mysqlnd_wireprotocol.c";
+ EXTENSION("mysqlnd", mysqlnd_source, false);
}
-
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.c
diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.1
php-src/ext/mysqlnd/mysqlnd_debug.c:1.2
--- php-src/ext/mysqlnd/mysqlnd_debug.c:1.1 Tue Oct 2 10:43:09 2007
+++ php-src/ext/mysqlnd/mysqlnd_debug.c Tue Oct 16 20:58:35 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_debug.c,v 1.1 2007/10/02 10:43:09 andrey Exp $ */
+/* $Id: mysqlnd_debug.c,v 1.2 2007/10/16 20:58:35 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
@@ -86,14 +86,14 @@
unsigned int
level, const char * type, const char * message)
{
char pipe_buffer[512];
- MYSQLND_ZTS(self);
enum_func_status ret;
int i;
char * message_line;
- size_t message_line_len;
+ uint message_line_len;
unsigned int flags = self->flags;
char pid_buffer[10], time_buffer[30], file_buffer[200],
line_buffer[6], level_buffer[7];
+ MYSQLND_ZTS(self);
if (!self->stream) {
if (FAIL == self->m->open(self, FALSE)) {
@@ -185,15 +185,15 @@
const
char *format, ...)
{
char pipe_buffer[512];
- MYSQLND_ZTS(self);
int i;
enum_func_status ret;
char * message_line, *buffer;
- size_t message_line_len;
+ uint message_line_len;
va_list args;
unsigned int flags = self->flags;
char pid_buffer[10], time_buffer[30], file_buffer[200],
line_buffer[6], level_buffer[7];
+ MYSQLND_ZTS(self);
if (!self->stream) {
if (FAIL == self->m->open(self, FALSE)) {
@@ -289,7 +289,7 @@
static zend_bool
MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self,
unsigned int line, const char * const file,
-
char * func_name, size_t func_name_len)
+
char * func_name, uint func_name_len)
{
if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name ==
NULL) {
return FALSE;
@@ -396,7 +396,7 @@
static void
MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char *
const mode)
{
- size_t mode_len = strlen(mode), i;
+ uint mode_len = strlen(mode), i;
enum mysqlnd_debug_parser_state state = PARSER_WAIT_MODIFIER;
self->flags = 0;
@@ -460,7 +460,7 @@
if (mode[j] == ',' || mode[j]
== ':') {
if (j > i + 2) {
char
func_name[1024];
- size_t
func_name_len = MIN(sizeof(func_name) - 1, j - i - 1);
+ uint
func_name_len = MIN(sizeof(func_name) - 1, j - i - 1);
memcpy(func_name, mode + i + 1, func_name_len);
func_name[func_name_len] = '\0';
@@ -630,6 +630,13 @@
/* }}} */
+#if ZEND_DEBUG
+#else
+#define __zend_filename "/unknown/unknown"
+#define __zend_lineno 0
+#endif
+
+
/* {{{ _mysqlnd_emalloc */
void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
{
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.h
diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1
php-src/ext/mysqlnd/mysqlnd_debug.h:1.2
--- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1 Tue Oct 2 10:45:27 2007
+++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 16 20:58:35 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_debug.h,v 1.1 2007/10/02 10:45:27 andrey Exp $ */
+/* $Id: mysqlnd_debug.h,v 1.2 2007/10/16 20:58:35 andrey Exp $ */
#ifndef MYSQLND_DEBUG_H
#define MYSQLND_DEBUG_H
@@ -36,7 +36,7 @@
enum_func_status (*log_va)(MYSQLND_DEBUG *self, unsigned int line,
const char * const file,
unsigned int level,
const char * type, const char *format, ...);
zend_bool (*func_enter)(MYSQLND_DEBUG *self, unsigned int line, const
char * const file,
- char * func_name,
size_t func_name_len);
+ char * func_name, uint
func_name_len);
enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int line,
const char * const file);
enum_func_status (*close)(MYSQLND_DEBUG *self);
enum_func_status (*free)(MYSQLND_DEBUG *self);
@@ -91,15 +91,13 @@
#else
-#define DBG_INF(msg)
-#define DBG_ERR(msg)
-#define DBG_INF_FMT(...)
-#define DBG_ERR_FMT(...)
-
-#define DBG_ENTER(func_name)
+static inline void DBG_INF(char *msg) {}
+static inline void DBG_ERR(char *msg) {}
+static inline void DBG_INF_FMT(char *format, ...) {}
+static inline void DBG_ERR_FMT(char *format, ...) {}
+static inline void DBG_ENTER(char *func_name) {}
#define DBG_RETURN(value) return (value)
#define DBG_VOID_RETURN return;
-
#endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.c?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_palloc.c
diff -u php-src/ext/mysqlnd/mysqlnd_palloc.c:1.3
php-src/ext/mysqlnd/mysqlnd_palloc.c:1.4
--- php-src/ext/mysqlnd/mysqlnd_palloc.c:1.3 Sun Oct 7 05:15:04 2007
+++ php-src/ext/mysqlnd/mysqlnd_palloc.c Tue Oct 16 20:58:35 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_palloc.c,v 1.3 2007/10/07 05:15:04 davidw Exp $ */
+/* $Id: mysqlnd_palloc.c,v 1.4 2007/10/16 20:58:35 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
@@ -359,7 +359,7 @@
*/
if (type == MYSQLND_RES_PS_BUF || type == MYSQLND_RES_PS_UNBUF)
{
; /* do nothing, zval_ptr_dtor will do the job*/
- } else if (Z_REFCOUNT_P(*zv) > 1) {
+ } else if (Z_REFCOUNT_PP(zv) > 1) {
/*
Not a prepared statement, then we have to
call copy_ctor and then zval_ptr_dtor()
@@ -389,7 +389,7 @@
/* The zval is from our cache */
/* refcount is always > 1, because we call Z_ADDREF_P(). Thus test
refcount > 2 */
- if (Z_REFCOUNT_P(*zv) > 2) {
+ if (Z_REFCOUNT_PP(zv) > 2) {
/*
Because the zval is first element in mysqlnd_zval structure,
then we can
do upcasting from zval to mysqlnd_zval here. Because we know
that this
@@ -435,7 +435,7 @@
++cache->put_hits;
++cache->free_items;
((mysqlnd_zval *)*zv)->point_type = MYSQLND_POINTS_FREE;
- Z_DELREF_P(*zv); /* Make it 1 */
+ Z_DELREF_PP(zv); /* Make it 1 */
ZVAL_NULL(*zv);
#ifdef ZTS
memset(&((mysqlnd_zval *)*zv)->thread_id, 0, sizeof(THREAD_T));
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_portability.h?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_portability.h
diff -u php-src/ext/mysqlnd/mysqlnd_portability.h:1.5
php-src/ext/mysqlnd/mysqlnd_portability.h:1.6
--- php-src/ext/mysqlnd/mysqlnd_portability.h:1.5 Sun Oct 7 12:33:40 2007
+++ php-src/ext/mysqlnd/mysqlnd_portability.h Tue Oct 16 20:58:35 2007
@@ -280,7 +280,6 @@
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
(((uint32) ((uchar) (A)[3])) << 24))
-#undef bit_uint5korr
#define bit_uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_priv.h
diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4
php-src/ext/mysqlnd/mysqlnd_priv.h:1.5
--- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4 Tue Oct 2 10:43:09 2007
+++ php-src/ext/mysqlnd/mysqlnd_priv.h Tue Oct 16 20:58:35 2007
@@ -18,11 +18,21 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_priv.h,v 1.4 2007/10/02 10:43:09 andrey Exp $ */
+/* $Id: mysqlnd_priv.h,v 1.5 2007/10/16 20:58:35 andrey Exp $ */
#ifndef MYSQLND_PRIV_H
#define MYSQLND_PRIV_H
+#ifndef Z_ADDREF_P
+/* PHP 5.2, old GC */
+#define Z_ADDREF_P(pz) (++(pz)->refcount)
+#define Z_DELREF_P(pz) (--(pz)->refcount)
+#define Z_REFCOUNT_P(pz) ((pz)->refcount)
+#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
+#define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz))
+#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
+#endif
+
#ifdef ZTS
#include "TSRM.h"
#endif
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php