[Pkg-libvirt-commits] [libguestfs] 31/61: normalize iconv handling

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:09:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.28.2-1
in repository libguestfs.

commit a595cbea241702f4c478d862c8426ab657bd35ab
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Fri Oct 17 13:53:50 2014 +0200

    normalize iconv handling
    
    Since the signature of iconv() changes between implementations (the
    constness of the second parameter, in particular), make use of the iconv
    module of gnulib to handle these potential differences, including an
    external (out of libc) iconv implementation.
    
    (cherry picked from commit 57512e778558c5b93cfa360c83836c2cf8fc5908)
---
 bootstrap                | 1 +
 src/Makefile.am          | 1 +
 src/inspect-fs-windows.c | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/bootstrap b/bootstrap
index b7a45ff..402ac4e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -64,6 +64,7 @@ gnumakefile
 hash
 hash-pjw
 human
+iconv
 ignore-value
 lock
 maintainer-makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 3d06203..e717251 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -161,6 +161,7 @@ libguestfs_la_LIBADD = \
 	$(LIB_CLOCK_GETTIME) \
 	$(LIBINTL) \
 	$(LTLIBTHREAD) \
+	$(LTLIBICONV) \
 	$(SERVENT_LIB)
 
 # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'.
diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
index 6d430d1..619706c 100644
--- a/src/inspect-fs-windows.c
+++ b/src/inspect-fs-windows.c
@@ -669,7 +669,7 @@ utf16_to_utf8 (/* const */ char *input, size_t len)
   char *inp = input;
   char *outp = out;
 
-  size_t r = iconv (ic, &inp, &inlen, &outp, &outlen);
+  size_t r = iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen);
   if (r == (size_t) -1) {
     if (errno == E2BIG) {
       int err = errno;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list