qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 4/6] qemu fixes
@ 2008-11-28 10:35 Christoph Egger
  2008-11-28 18:11 ` [Qemu-devel] " Blue Swirl
  2008-12-05 18:04 ` Blue Swirl
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Egger @ 2008-11-28 10:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]


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 <Christoph.Egger@amd.com>

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: bswap_qemu.diff --]
[-- Type: text/x-diff, Size: 1091 bytes --]

Index: bswap.h
===================================================================
--- bswap.h	(revision 5805)
+++ bswap.h	(working copy)
@@ -5,6 +5,12 @@
 
 #include <inttypes.h>
 
+#ifdef HAVE_MACHINE_BSWAP_H
+#include <sys/endian.h>
+#include <sys/types.h>
+#include <machine/bswap.h>
+#else
+
 #ifdef HAVE_BYTESWAP_H
 #include <byteswap.h>
 #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 <sys/endian.h>
+#include <sys/types.h>
+#include <machine/bswap.h>
+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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH 4/6] qemu fixes
  2008-11-28 10:35 [Qemu-devel] [PATCH 4/6] qemu fixes Christoph Egger
@ 2008-11-28 18:11 ` Blue Swirl
  2008-12-05 18:04 ` Blue Swirl
  1 sibling, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2008-11-28 18:11 UTC (permalink / raw)
  To: Christoph Egger; +Cc: qemu-devel

On 11/28/08, Christoph Egger <Christoph.Egger@amd.com> wrote:
>
>  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 <Christoph.Egger@amd.com>

This looks fine too, any objections?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH 4/6] qemu fixes
  2008-11-28 10:35 [Qemu-devel] [PATCH 4/6] qemu fixes Christoph Egger
  2008-11-28 18:11 ` [Qemu-devel] " Blue Swirl
@ 2008-12-05 18:04 ` Blue Swirl
  1 sibling, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2008-12-05 18:04 UTC (permalink / raw)
  To: Christoph Egger; +Cc: qemu-devel

On 11/28/08, Christoph Egger <Christoph.Egger@amd.com> wrote:
>
>  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 <Christoph.Egger@amd.com>

Thanks, applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-05 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 10:35 [Qemu-devel] [PATCH 4/6] qemu fixes Christoph Egger
2008-11-28 18:11 ` [Qemu-devel] " Blue Swirl
2008-12-05 18:04 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).