More MinGW C99 printf compliance
Passing "--std=gun99" is unfortunately not sufficient to make current MinGW compilers conform with respect to checking printf format strings. (The C runtime seems not to have problems.) Fix by using a "gnu_printf" format specifier not "printf".
This commit is contained in:
committed by
David Brownell
parent
c9fbfbd95c
commit
73349dc5ac
@@ -33,8 +33,9 @@
|
||||
type * variable = calloc(1, sizeof(type) * items)
|
||||
|
||||
/* For MinGW use 'I' prefix to print size_t (instead of 'z') */
|
||||
/* Except if __USE_MINGW_ANSI_STDIO is defined with MinGW */
|
||||
|
||||
#ifndef __MSVCRT__
|
||||
#if (!defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO))
|
||||
#define ZU "%zu"
|
||||
#else
|
||||
#define ZU "%Iu"
|
||||
|
||||
Reference in New Issue
Block a user