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:
Redirect 'Slash' NIL
2009-10-17 17:47:52 -07:00
committed by David Brownell
parent c9fbfbd95c
commit 73349dc5ac
3 changed files with 23 additions and 6 deletions

View File

@@ -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"