Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L60r3-0004ny-Se for qemu-devel@nongnu.org; Fri, 28 Nov 2008 05:45:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L60r1-0004mR-ST for qemu-devel@nongnu.org; Fri, 28 Nov 2008 05:45:45 -0500 Received: from [199.232.76.173] (port=56680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L60r1-0004mJ-Bj for qemu-devel@nongnu.org; Fri, 28 Nov 2008 05:45:43 -0500 Received: from outbound-wa4.frontbridge.com ([216.32.181.16]:30533 helo=WA4EHSOBE004.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1L60r1-0006p3-0D for qemu-devel@nongnu.org; Fri, 28 Nov 2008 05:45:43 -0500 From: Christoph Egger Date: Fri, 28 Nov 2008 12:35:22 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_rl8LJjXNUIgvGK8" Message-ID: <200811281135.23199.Christoph.Egger@amd.com> Subject: [Qemu-devel] [PATCH 4/6] qemu fixes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl --Boundary-00=_rl8LJjXNUIgvGK8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, This is a series of four patches which improve support for qemu on NetBSD. Attached patch makes NetBSD use the native bswap functions which compile. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_rl8LJjXNUIgvGK8 Content-Type: text/x-diff; charset="us-ascii"; name="bswap_qemu.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bswap_qemu.diff" Index: bswap.h =================================================================== --- bswap.h (revision 5805) +++ bswap.h (working copy) @@ -5,6 +5,12 @@ #include +#ifdef HAVE_MACHINE_BSWAP_H +#include +#include +#include +#else + #ifdef HAVE_BYTESWAP_H #include #else @@ -58,6 +64,8 @@ return bswap_64(x); } +#endif /* ! HAVE_MACHINE_BSWAP_H */ + static inline void bswap16s(uint16_t *s) { *s = bswap16(*s); Index: configure =================================================================== --- configure (revision 5805) +++ configure (working copy) @@ -1227,6 +1238,15 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then echo "#define HAVE_BYTESWAP_H 1" >> $config_h fi + cat > $TMPC << EOF +#include +#include +#include +int main(void) { return bswap32(0); } +EOF + if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h + fi fi if [ "$openbsd" = "yes" ] ; then --Boundary-00=_rl8LJjXNUIgvGK8--