From: Andrey Hristov Date: Mon, 25 Oct 2010 13:44:11 +0000 (+0000) Subject: rename and remove usage of inttypes.h, not needed X-Git-Tag: php-5.4.0alpha1~191^2~763 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e70b2fcda46623f75e0d77a79617f5178d4013f7;p=php rename and remove usage of inttypes.h, not needed --- diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index 304b50dae1..2860d17c49 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -27,7 +27,6 @@ #include "mysqlnd_wireprotocol.h" #include "mysqlnd_statistics.h" #include "zend_builtin_functions.h" -#include "inttypes.h" static const char * const mysqlnd_debug_default_trace_file = "/tmp/mysqlnd.trace"; diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index 100578745e..71759ebb8e 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -66,9 +66,9 @@ PHPAPI char * mysqlnd_get_backtrace(uint max_levels, size_t * length TSRMLS_DC); #if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 1400)) #define DBG_PROFILE_TIMEVAL_TO_DOUBLE(tp) ((tp.tv_sec * 1000000LL)+ tp.tv_usec) -#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __tp = {0}; uint64_t __start = 0; /* initialization is needed */ -#define DBG_PROFILE_START_TIME() gettimeofday(&__tp, NULL); __start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp); -#define DBG_PROFILE_END_TIME(duration) gettimeofday(&__tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__tp) - __start); +#define DBG_PROFILE_DECLARE_TIMEVARS struct timeval __dbg_prof_tp = {0}; uint64_t __dbg_prof_start = 0; /* initialization is needed */ +#define DBG_PROFILE_START_TIME() gettimeofday(&__dbg_prof_tp, NULL); __dbg_prof_start = DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp); +#define DBG_PROFILE_END_TIME(duration) gettimeofday(&__dbg_prof_tp, NULL); (duration) = (DBG_PROFILE_TIMEVAL_TO_DOUBLE(__dbg_prof_tp) - __dbg_prof_start); #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)