summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_debug.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-01-19 11:44:43 +0000
committerAndrey Hristov <andrey@php.net>2010-01-19 11:44:43 +0000
commitf056cdaa3e3f57aff66f6f33f70098fb7e5121f3 (patch)
treec6096e1e36f133e7a1bc4f337db716b4013f17ec /ext/mysqlnd/mysqlnd_debug.h
parent00afa7278bd2b5cafa757e89a6b104c28195c3b5 (diff)
downloadphp-git-f056cdaa3e3f57aff66f6f33f70098fb7e5121f3.tar.gz
fix windows
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.h')
-rw-r--r--ext/mysqlnd/mysqlnd_debug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h
index 763cf0d6c7..de8438d3ee 100644
--- a/ext/mysqlnd/mysqlnd_debug.h
+++ b/ext/mysqlnd/mysqlnd_debug.h
@@ -80,6 +80,7 @@ PHPAPI void _mysqlnd_free(void *ptr MYSQLND_MEM_D);
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,6 +90,16 @@ PHPAPI char * mysqlnd_get_backtrace(TSRMLS_D);
#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
@@ -103,6 +114,8 @@ PHPAPI char * mysqlnd_get_backtrace(TSRMLS_D);
#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, ...) {}