httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject RE: [PATCH] 64bit compiler issues
Date Tue, 16 Jul 2002 15:31:46 GMT
At 07:23 PM 7/15/2002, Ryan Bloom wrote:

>We could force the size, by using apr_int32_t.  The problem that he is
>having, is that pointers on _most_ 64-bit machines (Windows is a notable
>exception, there may be others), are 64-bits long.  But we are using
>int's, which are 32-bits for the pointers.  We have the added problem
>that throughout the code, we pass in integers for void *'s.   :-(

Transposed that statement ;-/

Pointers on Win64 are 64 bits long, just like you expected.

Both int and long remain 32 bits long, unlike what you might expect
(and certainly different from Unix.)

http://www.intel.com/design/itanium/getsoftready/sld011.htm
http://www.devx.com/Itanium/art_Porting2.asp

The biggest difference is the long value.  Since Windows is a P64
OS, rather than the Linux PL64 (both pointers and longs of 64 bits)
long becomes a rather dangerous type if you are assuming that
it's interchangeable with a pointer.

When we mean a void*, we need to spell out void*.  If we need to
pass it through an integer, prove it, and we will consider an
apr_intptr_t type, that could be nothing more complicated than
a union of the appropriate int type and void* for a given platform.

Bill



Mime
View raw message