All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Christoph Egger <Christoph.Egger@amd.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 5/6] qemu fixes
Date: Fri, 28 Nov 2008 13:17:14 +0100	[thread overview]
Message-ID: <492FE14A.6090805@siemens.com> (raw)
In-Reply-To: <200811281256.54759.Christoph.Egger@amd.com>

Christoph Egger wrote:
> 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.

I don't think allowing inclusion of both headers in their current form
is a good idea. But we may try harder to make the best out of the host's
sys/queue.h and provide missing support in form of

#ifndef MACRO_XYZ
#define MACRO_XYZ ...
#endif

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2 ES-OS
Corporate Competence Center Embedded Linux

  reply	other threads:[~2008-11-28 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 10:39 [Qemu-devel] [PATCH 5/6] qemu fixes Christoph Egger
2008-11-28 11:34 ` [Qemu-devel] " Jan Kiszka
2008-11-28 11:56   ` Christoph Egger
2008-11-28 12:17     ` Jan Kiszka [this message]
2008-11-28 16:46     ` M. Warner Losh
2008-12-05 18:00 ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492FE14A.6090805@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Christoph.Egger@amd.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.