[PATCHv2] build: fix virBufferVasprintf on mingw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

* .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); but
you can test it now in order to give a conditional ACK.
To guarantee that you have the right commit, do:

cd .gnulib
git fetch git://repo.or.cz/gnulib/ericb.git vasnprintf
git reset --hard d1776f5
cd ..

before using 'git am' on this message.

* .gnulib 7269b35...d1776f5 (8):
  > snprintf: guarantee %1$d, for libintl
  > xnanosleep: Rewrite to use new dtotimespec module.
  > timespec-add, timespec-sub: new modules
  > dtotimespec: new module
  > * lib/timespec.h (timespectod): New inline function.
  > * lib/timespec.h (timespec_sign): New inline function.
  > pselect: new module
  > sys_select: don't depend on sys_socket

 .gnulib        |    2 +-
 bootstrap.conf |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/.gnulib b/.gnulib
index 7269b35..d1776f5 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 7269b35c8d9be1a6f97906b9e29b8c422b92fc31
+Subproject commit d1776f5a9b91ae1dcbcd7cac2adc1efcbfc8ba5a
diff --git a/bootstrap.conf b/bootstrap.conf
index 581d60b..302cce8 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -97,6 +97,7 @@ usleep
 vasprintf
 verify
 vc-list-files
+vsnprintf
 waitpid
 warnings
 '
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]