This is the mail archive of the
mailing list for the binutils project.
Re: [patch bfd]: Fix printf formatter for mingw 1 of N
On Thu, Oct 11, 2012 at 10:55 AM, Pedro Alves <email@example.com> wrote:
> On 10/11/2012 06:36 PM, Ian Lance Taylor wrote:
>> Are you saying that mingw doesn't support %z in a printf format
>> string? It's in C99, i.e., it has been standardized for over ten
> It does, but not by default. By default you get printf and friends
> from Microsoft's C runtimes (msvcrt.dll and family). As you may know, Microsoft's
> toolchains implement little to no C99.
Well that is just insane.
> One can, however,
> at least in the mingw.org mingw, choose to link to C99-aware printf&co
> replacements: e.g., by defining _GNU_SOURCE or __USE_MINGW_ANSI_STDIO to 1
> before including stdio.h (this defines printf to __mingw_printf, the
gold normally defines _GNU_SOURCE via AC_GNU_SOURCE in the
configure.ac file. Perhaps something is wrong with the configure test
which causes it to not do the right thing on mingw?