qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 5/6] qemu fixes


From: Christoph Egger
Subject: Re: [Qemu-devel] Re: [PATCH 5/6] qemu fixes
Date: Fri, 28 Nov 2008 13:56:54 +0200
User-agent: KMail/1.9.7

On Friday 28 November 2008 12:34:54 Jan Kiszka wrote:
> Christoph Egger wrote:
> > Hi,
> >
> > This is a series of four patches which improve support
> > for qemu on NetBSD.
> >
> > sys-queue.h defines _SYS_QUEUE_H_ which is also defined by
> > the <sys/queue.h> system header. <sys/disk.h> uses SLIST_ENTRY
> > on NetBSD, which doesn't exist in sys-queue.h. Therefore,
> > include <sys/queue.h> before including sys-queue.h.
>
> Does this patch (which my mail client unfortunately refuses to cite...)
> take into account that we now have TAILQ_FOREACH_SAFE which NetBSD may
> lack?

Yes, NetBSD has it:

#define TAILQ_FOREACH_SAFE(var, head, field, next)                      \
        for ((var) = ((head)->tqh_first);                               \
                (var) != NULL && ((next) = TAILQ_NEXT(var, field), 1);  \
                (var) = (next))

Another option to this patch would be:

Renaming _SYS_QUEUE_H_ to QEMU_SYS_QUEUE_H_
at least allows to include both sys-queue.h and <sys/queue.h>.

If the macros are not compatible, gcc prints a warning about
redefining them. Using the -Wredundant-decls warning flag, gcc
always prints a warning when you try override or duplicate macro
defines and function declarations.

Christoph

-- 
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]