X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=logging%2Flog.c;h=78a0361de7c5e89d3586028fbd6e49a9a03999cf;hb=4f1c7f2eef8e85bc294f47ad780761820364171f;hp=49a3061a11c95084b3376498a52f5c8f4f3b7753;hpb=f833fd0411f0c9c626d9bf79e57c3b0b681a34e7;p=babeltrace.git diff --git a/logging/log.c b/logging/log.c index 49a3061a..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, @@ -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);