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] open-coded offsetof() in xen/include/public/ring.h

To: Jan Beulich <JBeulich@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] open-coded offsetof() in xen/include/public/ring.h
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 23 Feb 2010 14:30:51 +0000
Cc:
Delivery-date: Tue, 23 Feb 2010 06:31:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B83EF320200007800030AF5@xxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acq0kZ34ASBzf+XGQ2qtOYVb6oxtDQAAy5jO
Thread-topic: [Xen-devel] open-coded offsetof() in xen/include/public/ring.h
User-agent: Microsoft-Entourage/12.23.0.091001
On 23/02/2010 14:07, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

> Using gcc 4.5 we're seeing a build failure of the netfront driver due to
> its use of the __RING_SIZE() macro in the size specification of array
> members of struct netfront_info. Since the use of pointer types in
> integer constant expressions is an extension (albeit one - for the
> specific form used here - so far supported by all compilers Xen
> appears to be used with, and certainly all of the ones I was able to
> test), I wonder whether requiring offsetof() to be defined in order
> to use __RING_SIZE (or really a clone thereof usable in constant
> expressions, since in that case a type rather than a pointer ought to
> be passed in) would be acceptable.

That would be acceptable. We already require some things like stdint types
to be pre-defined for example.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>