Warning on Alpha Linux
Dmitry Timoshkov
dmitry at baikal.ru
Sat Jul 19 21:59:51 CDT 2003
"Todd Vierling" <tv at pobox.com> wrote:
> : That's an easy one. One an Alpha, sizeof(int) != sizeof(foo *). I think
> : sizeof(int) == 8, while sizeof(foo *) == 4.
>
> Other way round. sizeof(int) == 4; sizeof(void *) == 8.
In that case Wine needs to be compiled with _WIN64 macro defined.
In that case WPARAM and LPARAM will have correct size as well. But
be warned that compiling for Win64 is a completely unexplored terrain.
> : gcc is kind enough to warn you about this potentially nasty situation,
> : although in these particular cases I don't see how putting the pointer
> : in something larger will create a problem.
>
> Use intptr_t. If that's not available (via autoconf test), typedef intptr_t
> to be "unsigned long" locally, as "long" is the size of a pointer on all
> typical ILP32 and LP64 hosts.
In Wine we have to use UINT_PTR, ULONG_PTR, DWORD_PTR for casting pointer
to an integer type. These macros have correct behaviour on Win32 and Win64.
--
Dmitry.
More information about the wine-devel
mailing list