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] libelf: OpenBSD and NetBSD portability.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libelf: OpenBSD and NetBSD portability.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:41:00 -0700
Delivery-date: Wed, 26 Sep 2007 03:43:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1190299949 -3600
# Node ID 35893e27bdeb717333131102b7ee82eeccdc451b
# Parent  7bd5b1f55308bb08228d8c3a4ed778b496f6cf3a
libelf: OpenBSD and NetBSD portability.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/common/libelf/libelf-private.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)

diff -r 7bd5b1f55308 -r 35893e27bdeb xen/common/libelf/libelf-private.h
--- a/xen/common/libelf/libelf-private.h        Thu Sep 20 15:41:22 2007 +0100
+++ b/xen/common/libelf/libelf-private.h        Thu Sep 20 15:52:29 2007 +0100
@@ -33,8 +33,20 @@
 #define bswap_16(x) BSWAP_16(x)
 #define bswap_32(x) BSWAP_32(x)
 #define bswap_64(x) BSWAP_64(x)
+#elif defined(__NetBSD__)
+#include <sys/bswap.h>
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
+#elif defined(__OpenBSD__)
+#include <machine/endian.h>
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+#elif defined(__linux__) || defined(__Linux__)
+#include <byteswap.h>
 #else
-#include <byteswap.h>
+#error Unsupported OS
 #endif
 #include <xen/elfnote.h>
 #include <xen/libelf.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] libelf: OpenBSD and NetBSD portability., Xen patchbot-unstable <=