WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: Portability fixes for pty handling

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: Portability fixes for pty handling, in libxl_osdeps.h
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Jul 2010 01:45:19 -0700
Delivery-date: Fri, 30 Jul 2010 01:46:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1280416370 -3600
# Node ID 3477b170e9cbc33294a299455a37ee71bd38b4c8
# Parent  e7a7eec8f2ed543ba26fa34f40743e12ee96b591
libxl: Portability fixes for pty handling, in libxl_osdeps.h

This is the same approach used in tools/console, although we have a
separate instance of it as it is difficult to share code between these
two places.

Also add a missing include of <termios.h>, and fix a literal use of
-lutil to refer to UTIL_LIBS.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/Makefile           |    2 +-
 tools/libxl/libxl_bootloader.c |    2 +-
 tools/libxl/libxl_osdeps.h     |    8 ++++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/Makefile
--- a/tools/libxl/Makefile      Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/Makefile      Thu Jul 29 16:12:50 2010 +0100
@@ -15,7 +15,7 @@ CFLAGS += -I. -fPIC
 CFLAGS += -I. -fPIC
 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) 
$(CFLAGS_libblktapctl)
 
-LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) 
$(LDFLAGS_libblktapctl) -lutil
+LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) 
$(LDFLAGS_libblktapctl) $(UTIL_LIBS)
 
 LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o
 LIBXL_OBJS = flexarray.o libxl.o libxl_pci.o libxl_dom.o libxl_exec.o 
libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o 
$(LIBXL_OBJS-y)
diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c    Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/libxl_bootloader.c    Thu Jul 29 16:12:50 2010 +0100
@@ -15,9 +15,9 @@
 #include "libxl_osdeps.h"
 
 #include <string.h>
-#include <pty.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <termios.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>
diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/libxl_osdeps.h
--- a/tools/libxl/libxl_osdeps.h        Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/libxl_osdeps.h        Thu Jul 29 16:12:50 2010 +0100
@@ -23,6 +23,14 @@
 
 #define _GNU_SOURCE
 
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <util.h>
+#elif defined(__linux__)
+#include <pty.h>
+#elif defined(__sun__)
+#include <stropts.h>
+#endif
+
 #ifdef NEED_OWN_ASPRINTF
 #include <stdarg.h>
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: Portability fixes for pty handling, in libxl_osdeps.h, Xen patchbot-unstable <=