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

RE: [Xen-devel] sizeof(long) different under windows x64 and linuxx64



On Wed, 2008-01-23 at 10:34 +1100, James Harper wrote:

> The enormity of this problem is just sinking in... Xen makes use of a
> type (long) that it assumes is 32 bits under a 32 bit arch, and 64 bits
> under a 64 bit arch. Windows has no such native type (except for
> pointer), but that can be solved via some #if statements.
> 
> 'long' and 'unsigned long' is used all over the place inside
> xen/include/public. I would need to create this new type, and replace
> all occurrences of 'long' with it in the 8750-ish lines of .h files.
> 
> Any suggestions as to what the type should be called? Maybe a bit of
> typedef'ing around xen_ulong_t and xen_long_t would work?

well, i don't see yet where a new type would be needed.

it's only public/ which matters. and for the foreseeable time being,
from that it's only the subset which matters to frontends (although i
agree that fixing the full PV interface would be cleaner).

under the assumption that xen_ulong_t is to be interpreted as 'ulong as
what xen considers a ulong': fixing the xen_(u)long_t to (u)int64_t
should be sufficient, because that's what xen/gcc will always want it to
be on x86_64.

means you need to split the typedef among xen-32/64.h.

anything else?

regards,
daniel

-- 
dns@xxxxxxxxxxxx

Wire up your home and stay there.




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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.