Skip to contentSkip to conversation

Trivial patches for 12 to 15 January 2013

GIT PULL In review Stefan Hajnoczi 3 participants 8 messages Jan 15, 2013 – Jan 16, 2013

lore
Share & tools
lore
#0 lore raw

Trivial patches for QEMU 1.4.

The following changes since commit cf7c3f0cb5a7129f57fa9e69d410d6a05031988c:

virtio-9p: fix compilation error. (2013-01-14 18:52:39 -0600)

are available in the git repository at:

git://github.com/stefanha/qemu.git trivial-patches

for you to fetch changes up to ecbe251fa0eb4905c4a82c887e37057243b9fbad:

configure: try pkg-config for curses (2013-01-15 18:09:01 +0100)

----------------------------------------------------------------
Alex Rozenman (1):
Add libcacard/trace/generated-tracers.c to .gitignore

Andreas Färber (1):
qom: Make object_resolve_path_component() path argument const

Vadim Evard (1):
configure: try pkg-config for curses

 .gitignore           | 1 +
 configure            | 5 ++++-
 include/qom/object.h | 2 +-
 qom/object.c         | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.0.2
#1 lore raw

PATCH 1/3 Add libcacard/trace/generated-tracers.c to .gitignore

From: Alex Rozenman <[email protected]>

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 5fea65d..53fe9c3 100644
@@ -7,6 +7,7 @@ trace/generated-tracers.h
 trace/generated-tracers.c
 trace/generated-tracers-dtrace.h
 trace/generated-tracers-dtrace.dtrace
+libcacard/trace/generated-tracers.c
 *-timestamp
 *-softmmu
 *-darwin-user
Signature · 1 line
1.8.0.2
#2 lore raw

PATCH 2/3 qom: Make object_resolve_path_component() path argument const

In reply to Stefan Hajnoczi

From: Andreas Färber <[email protected]>

A usage with a hardcoded partial path such as

object_resolve_path_component(obj, "foo")

is totally valid but currently leads to a compilation error. Fix this.

---
 include/qom/object.h | 2 +-
 qom/object.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/qom/object.h +1 -1
index d43b289..1ef2f0e 100644
@@ -900,7 +900,7 @@ Object *object_resolve_path_type(const char *path, const char *typename,
  *
  * Returns: The resolved object or NULL on path lookup failure.
  */
-Object *object_resolve_path_component(Object *parent, gchar *part);
+Object *object_resolve_path_component(Object *parent, const gchar *part);
 
 /**
  * object_property_add_child:
qom/object.c +1 -1
index 351b88c..03e6f24 100644
@@ -1017,7 +1017,7 @@ gchar *object_get_canonical_path(Object *obj)
     return newpath;
 }
 
-Object *object_resolve_path_component(Object *parent, gchar *part)
+Object *object_resolve_path_component(Object *parent, const gchar *part)
 {
     ObjectProperty *prop = object_property_find(parent, part, NULL);
     if (prop == NULL) {
Signature · 1 line
1.8.0.2
#3 lore raw

PATCH 3/3 configure: try pkg-config for curses

In reply to Stefan Hajnoczi

From: Vadim Evard <[email protected]>

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

---
 configure | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +4 -1
index c908f66..40473a9 100755
@@ -2039,7 +2039,7 @@ fi
 if test "$mingw32" = "yes" ; then
     curses_list="-lpdcurses"
 else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses)"
 fi
 
 if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
   return s != 0;
 }
 EOF
+  IFS=:
   for curses_lib in $curses_list; do
+    unset IFS
     if compile_prog "" "$curses_lib" ; then
       curses_found=yes
       libs_softmmu="$curses_lib $libs_softmmu"
       break
     fi
   done
+  unset IFS
   if test "$curses_found" = "yes" ; then
     curses=yes
   else
Signature · 1 line
1.8.0.2
#4 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: try pkg-config for curses

Quoted 19 lines · Stefan Hajnoczi

From: Vadim Evard <[email protected]>

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

---
 configure | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +0 -0
index c908f66..40473a9 100755

configure fi · line 2042

Quoted 5 lines
configure +1 -1
@@ -2039,7 +2039,7 @@ fi
 if test "$mingw32" = "yes" ; then
     curses_list="-lpdcurses"
 else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses)"

Please fix this as a follow up but this is sloppy.

pkg-config spews stuff to stderr when a package isn't found so this ends up outputting junk in the configure if ncurses isn't found.

Regards,

Anthony Liguori

Quoted 22 lines
configure +3 -0
 fi
 
 if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
   return s != 0;
 }
 EOF
+  IFS=:
   for curses_lib in $curses_list; do
+    unset IFS
     if compile_prog "" "$curses_lib" ; then
       curses_found=yes
       libs_softmmu="$curses_lib $libs_softmmu"
       break
     fi
   done
+  unset IFS
   if test "$curses_found" = "yes" ; then
     curses=yes
   else
Signature · 1 line
1.8.0.2
#5 lore raw

Re: [Qemu-devel] [PATCH 3/3 v2] configure: try pkg-config for curses

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

---
 configure |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +4 -1
index c908f66..477c4e0 100755
@@ -2039,7 +2039,7 @@ fi
 if test "$mingw32" = "yes" ; then
     curses_list="-lpdcurses"
 else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
 fi
 
 if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
   return s != 0;
 }
 EOF
+  IFS=:
   for curses_lib in $curses_list; do
+    unset IFS
     if compile_prog "" "$curses_lib" ; then
       curses_found=yes
       libs_softmmu="$curses_lib $libs_softmmu"
       break
     fi
   done
+  unset IFS
   if test "$curses_found" = "yes" ; then
     curses=yes
   else
Signature · 1 line
1.7.10.4
Quoted 59 lines · Anthony Liguori
Quoted 19 lines · Stefan Hajnoczi

From: Vadim Evard<[email protected]>

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

---
  configure | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
configure +0 -0
index c908f66..40473a9 100755

configure fi · line 2042

Quoted 5 lines
configure +1 -1
@@ -2039,7 +2039,7 @@ fi
  if test "$mingw32" = "yes" ; then
      curses_list="-lpdcurses"
  else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses)"

Please fix this as a follow up but this is sloppy.

pkg-config spews stuff to stderr when a package isn't found so this ends up outputting junk in the configure if ncurses isn't found.

Regards,

Anthony Liguori

Quoted 22 lines
configure +3 -1
  fi
 
  if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
    return s != 0;
  }
  EOF
+  IFS=:
    for curses_lib in $curses_list; do
+    unset IFS
      if compile_prog "" "$curses_lib" ; then
        curses_found=yes
        libs_softmmu="$curses_lib $libs_softmmu"
        break
      fi
    done
+  unset IFS
    if test "$curses_found" = "yes" ; then
      curses=yes
    else
--

1.8.0.2

#6 lore raw

Re: [Qemu-devel] [PATCH 3/3 v2] configure: try pkg-config for curses

Quoted 8 lines · Vadim Evard

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

The original patch is already in master so you'll need to send an incremental one.

Regards,

Anthony Liguori

Quoted 99 lines
---
 configure |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +4 -1
index c908f66..477c4e0 100755
@@ -2039,7 +2039,7 @@ fi
 if test "$mingw32" = "yes" ; then
     curses_list="-lpdcurses"
 else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
 fi
 
 if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
   return s != 0;
 }
 EOF
+  IFS=:
   for curses_lib in $curses_list; do
+    unset IFS
     if compile_prog "" "$curses_lib" ; then
       curses_found=yes
       libs_softmmu="$curses_lib $libs_softmmu"
       break
     fi
   done
+  unset IFS
   if test "$curses_found" = "yes" ; then
     curses=yes
   else
Signature · 1 line
1.7.10.4
Quoted 59 lines · Anthony Liguori
Quoted 19 lines · Stefan Hajnoczi

From: Vadim Evard<[email protected]>

Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance.

Fixes #1094786 for me.

---
  configure | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
configure +0 -0
index c908f66..40473a9 100755

configure fi · line 2042

Quoted 5 lines
configure +1 -1
@@ -2039,7 +2039,7 @@ fi
  if test "$mingw32" = "yes" ; then
      curses_list="-lpdcurses"
  else
-    curses_list="-lncurses -lcurses"
+    curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses)"

Please fix this as a follow up but this is sloppy.

pkg-config spews stuff to stderr when a package isn't found so this ends up outputting junk in the configure if ncurses isn't found.

Regards,

Anthony Liguori

Quoted 22 lines
configure +3 -1
  fi
 
  if test "$curses" != "no" ; then
@@ -2052,13 +2052,16 @@ int main(void) {
    return s != 0;
  }
  EOF
+  IFS=:
    for curses_lib in $curses_list; do
+    unset IFS
      if compile_prog "" "$curses_lib" ; then
        curses_found=yes
        libs_softmmu="$curses_lib $libs_softmmu"
        break
      fi
    done
+  unset IFS
    if test "$curses_found" = "yes" ; then
      curses=yes
    else
--

1.8.0.2