[libvirt] [PATCHv2] build: fix virBufferVasprintf on mingw

Eric Blake eblake at redhat.com
Tue Jul 5 16:22:58 UTC 2011


On 07/01/2011 11:52 AM, Eric Blake wrote:
> Gnulib documents that mingw vsnprintf is broken (it returns -1
> on out-of-space, instead of the count of what would have been
> printed); but while we were using the snprintf wrapper, we had
> not yet been using the vsnprintf wrapper.

Oh well, this missed 0.9.3 (a holiday weekend slowed down the gnulib
side of the equation).  This patch is still worth applying in libvirt,
but now that we've missed the release, I don't feel comfortable claiming
it as a build-breaker, so I'll wait for an ACK.

> 
> Meanwhile, mingw (but not mingw64) has a replacement snprintf
> that fixes return values, but still lacks %1$s support; so in
> that case, gnulib didn't replace snprintf, but libintl then
> went ahead and installed a version that supported %1$s but not
> return values.  Gnulib has since been fixed to guarantee that
> the snprintf module will always guarantee the constraints needed
> by libintl.
> 
> * .gnulib: Update to latest, for vsnprintf fix.
> * bootstrap.conf (gnulib_modules): Add vsnprintf.
> Reported by Matthias Bolte.
> ---
> 
> This patch cannot be applied until commit d1776f5 goes into
> upstream gnulib (possibly under a different commit id);

The gnulib side is now commit c3153d2c...

> +++ b/.gnulib
> @@ -1 +1 @@
> -Subproject commit 7269b35c8d9be1a6f97906b9e29b8c422b92fc31
> +Subproject commit d1776f5a9b91ae1dcbcd7cac2adc1efcbfc8ba5a

so any upstream gnulib commit after that point is sufficient.  I won't
bother to send a v3 of this patch with the new commit id unless anyone
asks for it.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110705/23c1f97a/attachment-0001.sig>


More information about the libvir-list mailing list