WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] libxl: Include a version of bsd's queue.h

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: Include a version of bsd's queue.h
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 26 Oct 2011 09:22:00 +0100
Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Wed, 26 Oct 2011 01:22:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4EA7C176.3020704@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <20134.62279.50041.126603@xxxxxxxxxxxxxxxxxxxxxxxx> <20134.63697.38240.276236@xxxxxxxxxxxxxxxxxxxxxxxx> <4EA7C176.3020704@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-10-26 at 09:14 +0100, Christoph Egger wrote:
> On 10/25/11 19:58, Ian Jackson wrote:
> > Ian Jackson writes ("[Xen-devel] [PATCH] libxl: Include a version of bsd's 
> > queue.h"):
> >> We would like some linked list macros which are (a) well known to be
> >> sane and (b) typesafe.  BSD's queue.h meets these criteria.
> >>
> >> The files in this changeset were obtained with:
> >>    svn co -r 221843 svn://svn.freebsd.org/base/head/sys/sys/
> >>    svn co -r 221843 svn://svn.freebsd.org/base/head/share/man/man3
> >
> > I posted this because I noticed (too late) that libxl_qmp.c includes
> > <sys/queue.h>  and uses some macros that are only available in some
> > queue.h versions.  This is not ideal for portability of course.
> >
> > I think it would be good to include this massaged queue.h and use it
> > in libxl_qmp.c.
> 
> These headers cause build errors on *BSD due to collisions with the
> native headers. Two solutions:
> 
> - Only use them on platforms where they do not exist
> - Add a namespace prefix to the macros and use them consequently

Ian provided a script which adds a namespace to these files at build
time, or at least was supposed to. If it isn't working properly then we
need to see the actual failures you are seeing.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel