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

[Xen-devel] size_t and printk and Xen

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] size_t and printk and Xen
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Sat, 11 Oct 2008 07:05:34 -0700 (PDT)
Delivery-date: Sat, 11 Oct 2008 07:06:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
I am adding code in Xen that printk's a size_t and find that
I can't write code (short of ifdef'ing) that compiles on
both 32-bit and 64-bit because size_t is typedef'd in Xen as an
unsigned long.  C.f.

http://www.velocityreviews.com/forums/t438359-portable-way-to-printf-a-sizet-instance.html

It appears that the %z format is understood by Xen printk.

Is the typedef historical and should be removed?  Or is it
necessary for some (older?) compilers?

If it is not going to be removed, is there a workaround
(other than ifdef'ing)?

Thanks,
Dan

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

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