On 07/03/2011 06:39 PM, Bruno Haible wrote: > Hi Eric, > >> diff --git a/ChangeLog b/ChangeLog >> index fcc2e6e..5f3ffb7 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,13 @@ >> +2011-07-01 Eric Blake <ebl...@redhat.com> >> + >> + snprintf: guarantee %1$d, for libintl >> + * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require %1$d support. >> + * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise. >> + * doc/posix-functions/snprintf.texi (snprintf): Update. >> + * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise. >> + * tests/test-snprintf.c (main): Enhance test. >> + * tests/test-vsnprintf.c (main): Likewise. > > This patch is all right. > > I knew it was risky to provide an snprintf replacement in libintl that fixes > the %n$ interpretation but not the return value, and on the other hand gnulib > also may or may not replace snprintf... Thanks for all the analysis. > > The changes warrant some comments, but we can add them later. I'm too tired > for > today.
I added this comment in the .m4 files: dnl Libintl 0.17 will replace snprintf only if it does not support %1$s, dnl but defers to any gnulib snprintf replacements. Therefore, gnulib dnl must guarantee that the decision for replacing snprintf is a superset dnl of the reasons checked by libintl. then pushed; if you want to add further comments, go right ahead. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature