[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printf %n on mingw
From: |
Bruno Haible |
Subject: |
Re: printf %n on mingw |
Date: |
Thu, 7 Jun 2007 04:38:30 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> Bruno, you may be interested in this thread:
> http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html.
>
> It looks like for *printf-posix on mingw and other WOE32 environments, you
> will
> need to add a call to _set_printf_count_output to ensure that %n will work on
> mingw executables when run on Vista.
Thanks for the warning. There is nothing to change in gnulib, because
1) As you can see from the table in m4/printf.m4, "%n" is not fully working
on mingw anyway. Therefore gnulib will always enable its replacement
code for %n.
2) gnulib's own use of %n in lib/vasnprintf.c is guarded with a failure
test:
/* snprintf() doesn't understand the '%n'
directive. */
...
/* Don't use the '%n' directive; instead, look
at the snprintf() return value. */
Bruno