X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=logging%2Flog.c;h=78a0361de7c5e89d3586028fbd6e49a9a03999cf;hb=04df8ef357af85f6741aca483a80acb57eb2875c;hp=1a3204cc5cab5e6a3e62c7ce3fb5dabdcf2b8c1b;hpb=94ddf5ca7d77aa87e251205b8cbe237897d2c2ca;p=babeltrace.git diff --git a/logging/log.c b/logging/log.c index 1a3204cc..78a0361d 100644 --- a/logging/log.c +++ b/logging/log.c @@ -490,7 +490,8 @@ extern unsigned long pthread_getsequence_np(pthread_t *); #define memccpy _memccpy #endif -#if (defined(_MSC_VER) && !defined(__INTEL_COMPILER)) || defined(__MINGW64__) +#if (defined(_MSC_VER) && !defined(__INTEL_COMPILER)) || \ + (defined(__MINGW64__) && !defined(__USE_MINGW_ANSI_STDIO)) #define vsnprintf(s, sz, fmt, va) fake_vsnprintf(s, sz, fmt, va) static int fake_vsnprintf(char *s, size_t sz, const char *fmt, va_list ap) { @@ -684,6 +685,7 @@ static const bt_log_output out_stderr = {BT_LOG_OUT_STDERR}; BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL = 0; #endif +BT_HIDDEN const bt_log_spec _bt_log_stderr_spec = { BT_LOG_GLOBAL_FORMAT, @@ -742,7 +744,7 @@ static char lvl_char(const int lvl) #define TCACHE_FLUID (0x40000000 | 0x80000000) static unsigned g_tcache_mode = TCACHE_STALE; static struct timeval g_tcache_tv = {0, 0}; -static struct tm g_tcache_tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static struct tm g_tcache_tm = {0}; static INLINE int tcache_get(const struct timeval *const tv, struct tm *const tm) { @@ -905,7 +907,7 @@ static char *put_integer_r(unsigned v, const int sign, const unsigned w, const char wc, char *const e) { static const char _signs[] = {'-', '0', '+'}; - static const char *const signs = _signs + 1; + const char *const signs = _signs + 1; char *p = e; do { *--p = '0' + v % 10; } while (0 != (v /= 10)); if (0 == sign) return put_padding_r(w, wc, p, e);