From c2dda6ebb3e50bffd5c235d05dd72e08996cf4de Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 30 Jun 2011 11:57:42 -0600 Subject: [PATCH] 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 | 2 +- bootstrap.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gnulib b/.gnulib index 7269b35c8d..c3153d2c0c 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 7269b35c8d9be1a6f97906b9e29b8c422b92fc31 +Subproject commit c3153d2c0cf5f675ae13ae2bd1dee0f463b9c86a diff --git a/bootstrap.conf b/bootstrap.conf index 581d60be99..d3ff150607 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -80,6 +80,7 @@ socket stdarg stpcpy strchrnul +strdup-posix strndup strerror strerror_r-posix @@ -97,6 +98,7 @@ usleep vasprintf verify vc-list-files +vsnprintf waitpid warnings '