]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: update to latest gnulib
authorEric Blake <eblake@redhat.com>
Tue, 29 Nov 2011 23:42:23 +0000 (16:42 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 1 Dec 2011 21:12:59 +0000 (14:12 -0700)
* .gnulib: Update to latest, for improved 'make syntax-check' and
compiler warnings.
* m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS):
Re-silence -Wformat-nonliteral.
* cfg.mk (_test_script_regex): Recognize our test scripts.
* gnulib/local/lib/*.diff: Drop, now that gnulib has this.
* tests/virsh-optparse: Fix use of compare.
* tests/virsh-schedinfo: Likewise.

.gnulib
cfg.mk
gnulib/local/lib/openpty.c.diff [deleted file]
gnulib/local/lib/pty.in.h.diff [deleted file]
m4/virt-compile-warnings.m4
tests/virsh-optparse
tests/virsh-schedinfo

diff --git a/.gnulib b/.gnulib
index e56e96fe20f72586e9ec5c528b9a9a06daa2ecc6..6b93d00f5410ec183e3a70ebf8e418e3b1bb0191 160000 (submodule)
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit e56e96fe20f72586e9ec5c528b9a9a06daa2ecc6
+Subproject commit 6b93d00f5410ec183e3a70ebf8e418e3b1bb0191
diff --git a/cfg.mk b/cfg.mk
index 574c7a49f4a26eca056782c7c02ca1d0b96615f2..817b5f31f9bcc1ad4ab0f6b4497f63acb30f03c2 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -36,6 +36,9 @@ generated_files = \
   $(srcdir)/src/remote/*_protocol.[ch] \
   $(srcdir)/gnulib/lib/*.[ch]
 
+# We haven't converted all scripts to using gnulib's init.sh yet.
+_test_script_regex = \<\(init\|test-lib\)\.sh\>
+
 # Tests not to run as part of "make distcheck".
 local-checks-to-skip =                 \
   changelog-check                      \
diff --git a/gnulib/local/lib/openpty.c.diff b/gnulib/local/lib/openpty.c.diff
deleted file mode 100644 (file)
index f17e566..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git c/lib/openpty.c i/lib/openpty.c
-index c398db5..d61d5ba 100644
---- c/lib/openpty.c
-+++ i/lib/openpty.c
-@@ -32,6 +32,21 @@ rpl_openpty (int *amaster, int *aslave, char *name,
-                   (struct winsize *) winp);
- }
-
-+#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
-+
-+# include <errno.h>
-+
-+int
-+openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
-+         char *name _GL_UNUSED,
-+         struct termios const *termp _GL_UNUSED,
-+         struct winsize const *winp _GL_UNUSED)
-+{
-+  /* Mingw lacks pseudo-terminals altogether.  */
-+  errno = ENOSYS;
-+  return -1;
-+}
-+
- #else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, mingw */
-
- # include <fcntl.h>
diff --git a/gnulib/local/lib/pty.in.h.diff b/gnulib/local/lib/pty.in.h.diff
deleted file mode 100644 (file)
index 9470700..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git c/lib/pty.in.h i/lib/pty.in.h
-index aff989c..00eecc6 100644
---- c/lib/pty.in.h
-+++ i/lib/pty.in.h
-@@ -92,6 +92,8 @@ _GL_WARN_ON_USE (forkpty, "forkpty is not declared consistently - "
- /* Create pseudo tty master slave pair and set terminal attributes
-    according to TERMP and WINP.  Return handles for both ends in
-    *AMASTER and *ASLAVE, and return the name of the slave end in NAME.  */
-+struct termios;
-+struct winsize;
- # if @REPLACE_OPENPTY@
- #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
- #   undef openpty
index 305036fd0f5993ca2b85c831897f51b6c442213e..213b3db70e75c0d6220218484580e941a00957af 100644 (file)
@@ -55,8 +55,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
         # Things like virAsprintf mean we can't use this
         dontwarn="$dontwarn -Wformat-nonliteral"
 
-        # We might fundamentally need some of these disabled forever, but ideally
-        # we'd turn many of them on
+        # We might fundamentally need some of these disabled forever, but
+        # ideally we'd turn many of them on
         dontwarn="$dontwarn -Wfloat-equal"
         dontwarn="$dontwarn -Wdeclaration-after-statement"
         dontwarn="$dontwarn -Wcast-qual"
@@ -88,6 +88,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
         # that one off, so we need to manually enable this again
         gl_WARN_ADD([-Wjump-misses-init])
 
+        # GNULIB turns on -Wformat=2 which implies -Wformat-nonliteral,
+        # so we need to manually re-exclude it.
+        gl_WARN_ADD([-Wno-format-nonliteral])
+
         # This should be < 256 really. Currently we're down to 4096,
         # but using 1024 bytes sized buffers (mostly for virStrerror)
         # stops us from going down further
index d0d4329236650f72d39ab253d1c0621d6d4a54b0..fc2279f9383896a63b8b52e1475ce170e4776719 100755 (executable)
@@ -65,7 +65,7 @@ for args in \
     '--count=2 test' \
 ; do
   virsh -d0 -c $test_url setvcpus $args >out 2>>err || fail=1
-  LC_ALL=C sort out | compare - exp-out || fail=1
+  LC_ALL=C sort out | compare exp-out - || fail=1
 done
 
 # Another complex parsing example
@@ -84,7 +84,7 @@ EOF
 virsh -q -c $test_url snapshot-create-as --print-xml test \
   --diskspec 'vda,file=a&b,,c,snapshot=external' --description '1<2' \
   --diskspec vdb >out 2>>err || fail=1
-compare out exp-out || fail=1
+compare exp-out out || fail=1
 
 cat <<\EOF > exp-out || framework_failure
 <domainsnapshot>
@@ -98,7 +98,7 @@ cat <<\EOF > exp-out || framework_failure
 EOF
 virsh -q -c $test_url snapshot-create-as  --print-xml test name vda vdb \
   >out 2>>err || fail=1
-compare out exp-out || fail=1
+compare exp-out out || fail=1
 
 cat <<\EOF > exp-out || framework_failure
 <domainsnapshot>
@@ -122,7 +122,7 @@ for args in \
 ; do
   virsh -q -c $test_url snapshot-create-as --print-xml $args \
     >out 2>>err || fail=1
-  compare out exp-out || fail=1
+  compare exp-out out || fail=1
 done
 
 test -s err && fail=1
@@ -133,6 +133,6 @@ error: this function is not supported by the connection driver: virDomainQemuMon
 EOF
 virsh -q -c $test_url qemu-monitor-command test a >out 2>err && fail=1
 test -s out && fail=1
-compare err exp-err || fail=1
+compare exp-err err || fail=1
 
 (exit $fail); exit $fail
index 9d885eed9c26f8973ce1b8d91e99b884ca8d196b..8ea4ce47d413e6256b7126640fd835bf704d5af6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure that virsh schedinfo --set invalid=val fails
 
-# Copyright (C) 2010 Red Hat, Inc.
+# Copyright (C) 2010-2011 Red Hat, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ fail=0
 test_url=test:///default
 
 virsh -c $test_url schedinfo 1 --set j=k >out 2>err && fail=1
-compare out exp-out || fail=1
-compare err exp-err || fail=1
+compare exp-out out || fail=1
+compare exp-err err || fail=1
 
 (exit $fail); exit $fail