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] Partial fix for compat build non-portability

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Partial fix for compat build non-portability
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Wed, 10 Jan 2007 18:30:40 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 10 Jan 2007 10:28:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1CADF11.76E2%keir@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070110173719.GA31121@xxxxxxxxxxxxxxxxxxxxxxx> <C1CADF11.76E2%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Jan 10, 2007 at 06:21:05PM +0000, Keir Fraser wrote:

> > Still to be resolved is the pragma pack push issue; this is non-portable
> > pragma only enabled on some targets, as it's intended for win32
> > compatibility not something for general use. We should be wrapping each
> > structure in a pragma pack(4) / pragma pack() pair, but trying to fix
> > that makes my head hurt, and Jan isn't interested.
> 
> We only care about it working for the x86/64 target since that's the only
> one that asserts CONFIG_COMPAT. Why would wrapping structs individually be
> better than wrapping whole header files?

Jan was concerned that just using

#pragma pack(4)
...
#pragma pack()

wouldn't work if an included header file used pragma. From the docs it
seems that #pragma pack() will reset to the default rather than what was
last pushed.

One simple thing might just to be follow every #include in the compat
headers with another #pragma pack(4)?

regards
john

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