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



Reply via email to