qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] avoid name clashes due to LIST_* macros


From: Ian Jackson
Subject: Re: [Qemu-devel] [PATCH] avoid name clashes due to LIST_* macros
Date: Thu, 7 Feb 2008 10:23:37 +0000

Anthony Liguori writes ("Re: [Qemu-devel] [PATCH] avoid name clashes due to 
LIST_* macros"):
> Ian Jackson wrote:
> > qemu's audio subdirectory contains a copy of BSD's sys-queue.h, which
> > defines a bunch of LIST_ macros.  This makes it difficult to build a
> > program made partly out of qemu and partly out of the Linux kernel[1],
> > since Linux has a different set of LIST_ macros.  It might also cause
> > trouble when mixing with BSD-derived code.
> 
> That doesn't seem like a very good justification.  If you're mixing QEMU 
> code with other code,

Well, surely with something like qemu one might expect to mix the code
with other things ?

Or is it the view of qemu upstream that qemu is not supposed to be
portable to such embedded environments derived from Linux ?  (Or BSD
for that matter - since these LIST_* names came from BSD originally.)

>   it's easier for you to maintain these merge 
> conflict fixes as normal QEMU developers would have no idea what it 
> wasn't okay to just use LIST_xxx

This merge conflict is impractical to fix every time.  Surely it is
better just to fix it once in one place ?  Normal qemu developers will
know that they can use QEMU_LIST_... because that's what will be
defined in the qemu tree.

qemu developers who copy-and-paste code from other projects should IMO
think more carefully about name clashes.

Ian.




reply via email to

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