]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix virBufferVasprintf on mingw
authorEric Blake <eblake@redhat.com>
Thu, 30 Jun 2011 17:57:42 +0000 (11:57 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 7 Jul 2011 18:34:19 +0000 (12:34 -0600)
commitc2dda6ebb3e50bffd5c235d05dd72e08996cf4de
treec4cc781c5804d85035d997249ea89c42ab3cd11c
parenta34e193fb7ac887bb25ac47450bae14dbc829cc8
build: fix virBufferVasprintf on mingw

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.

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.

Also, we want to guarantee that strdup sets errno on failure.

* .gnulib: Update to latest, for vsnprintf fix.
* bootstrap.conf (gnulib_modules): Add vsnprintf, strdup-posix.
Reported by Matthias Bolte.
.gnulib
bootstrap.conf