andrey                                   Tue, 19 Jan 2010 11:44:43 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=293723

Log:
fix windows

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h    2010-01-19 
10:47:51 UTC (rev 293722)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.h    2010-01-19 
11:44:43 UTC (rev 293723)
@@ -80,6 +80,7 @@

 PHPAPI char *  mysqlnd_get_backtrace(TSRMLS_D);

+#if !defined(PHP_WIN32)
 #define DBG_INF_EX(dbg_obj, msg)               do { if (dbg_skip_trace == 
FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "info : ", (msg)); 
} while (0)
 #define DBG_ERR_EX(dbg_obj, msg)               do { if (dbg_skip_trace == 
FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "error: ", (msg)); 
} while (0)
 #define DBG_INF_FMT_EX(dbg_obj, ...)   do { if (dbg_skip_trace == FALSE) 
(dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "info : ", 
__VA_ARGS__); } while (0)
@@ -89,7 +90,17 @@
 #define DBG_RETURN_EX(dbg_obj, value)  do { if ((dbg_obj)) 
(dbg_obj)->m->func_leave((dbg_obj), __LINE__, __FILE__); return (value); } 
while (0)
 #define DBG_VOID_RETURN_EX(dbg_obj)            do { if ((dbg_obj)) 
(dbg_obj)->m->func_leave((dbg_obj), __LINE__, __FILE__); return; } while (0)

+#else
+static inline void DBG_INF_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) 
{}
+static inline void DBG_ERR_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) 
{}
+static inline void DBG_INF_FMT_EX(MYSQLND_DEBUG * dbg_obj, ...) {}
+static inline void DBG_ERR_FMT_EX(MYSQLND_DEBUG * dbg_obj, ...) {}
+static inline void DBG_ENTER_EX(MYSQLND_DEBUG * dbg_obj, const char * const 
func_name) {}
+#define DBG_RETURN_EX(dbg_obj, value) return (value)
+#define DBG_VOID_RETURN_EX(dbg_obj) return

+#endif
+
 #if MYSQLND_DBG_ENABLED == 1

 #define DBG_INF(msg)           DBG_INF_EX(MYSQLND_G(dbg), (msg))
@@ -103,6 +114,8 @@

 #elif MYSQLND_DBG_ENABLED == 0

+
+
 static inline void DBG_INF(const char * const msg) {}
 static inline void DBG_ERR(const char * const msg) {}
 static inline void DBG_INF_FMT(const char * const format, ...) {}

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h       2010-01-19 10:47:51 UTC 
(rev 293722)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.h       2010-01-19 11:44:43 UTC 
(rev 293723)
@@ -80,6 +80,7 @@

 PHPAPI char *  mysqlnd_get_backtrace(TSRMLS_D);

+#if !defined(PHP_WIN32)
 #define DBG_INF_EX(dbg_obj, msg)               do { if (dbg_skip_trace == 
FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "info : ", (msg)); 
} while (0)
 #define DBG_ERR_EX(dbg_obj, msg)               do { if (dbg_skip_trace == 
FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "error: ", (msg)); 
} while (0)
 #define DBG_INF_FMT_EX(dbg_obj, ...)   do { if (dbg_skip_trace == FALSE) 
(dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "info : ", 
__VA_ARGS__); } while (0)
@@ -89,7 +90,17 @@
 #define DBG_RETURN_EX(dbg_obj, value)  do { if ((dbg_obj)) 
(dbg_obj)->m->func_leave((dbg_obj), __LINE__, __FILE__); return (value); } 
while (0)
 #define DBG_VOID_RETURN_EX(dbg_obj)            do { if ((dbg_obj)) 
(dbg_obj)->m->func_leave((dbg_obj), __LINE__, __FILE__); return; } while (0)

+#else
+static inline void DBG_INF_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) 
{}
+static inline void DBG_ERR_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) 
{}
+static inline void DBG_INF_FMT_EX(MYSQLND_DEBUG * dbg_obj, ...) {}
+static inline void DBG_ERR_FMT_EX(MYSQLND_DEBUG * dbg_obj, ...) {}
+static inline void DBG_ENTER_EX(MYSQLND_DEBUG * dbg_obj, const char * const 
func_name) {}
+#define DBG_RETURN_EX(dbg_obj, value) return (value)
+#define DBG_VOID_RETURN_EX(dbg_obj) return

+#endif
+
 #if MYSQLND_DBG_ENABLED == 1

 #define DBG_INF(msg)           DBG_INF_EX(MYSQLND_G(dbg), (msg))
@@ -103,6 +114,8 @@

 #elif MYSQLND_DBG_ENABLED == 0

+
+
 static inline void DBG_INF(const char * const msg) {}
 static inline void DBG_ERR(const char * const msg) {}
 static inline void DBG_INF_FMT(const char * const format, ...) {}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to