From: Andrey Hristov Date: Tue, 19 Jan 2010 11:44:43 +0000 (+0000) Subject: fix windows X-Git-Tag: php-5.4.0alpha1~425 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f056cdaa3e3f57aff66f6f33f70098fb7e5121f3;p=php fix windows --- 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, ...) {}