Re: [AD] 64-bit intptr_t on WIndows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, August 15, 2009 4:59 pm, Matthew Leverton said:
> Can we get something like the attached code added to Allegro 5 for
> 64-bit MSVC in the auto-guess types? It's taken from crtdefs.h, but I
> don't think that entire file should be included, nor do I know which
> compilers have it.
>
> _WIN64 is automatically defined by 64-bit Windows compilers. The _W64
> on the 32-bit one is just a portability warning and isn't strictly
> necessary. I don't know if _W64 is commonly defined (as _w64) or not.
>
> Obviously it could be shortened to checking for _WIN64 and #defining
> intptr_t, but that won't play well with other Windows headers. And in
> fact, the current 4.9 doesn't work well with Windows headers either
> since it's not defining _INTPTR_T_DEFINED, etc. I don't think any of
> the other types are defined by MSVC headers.
>
> --
> Matthew Leverton

So with _W64 there it will generate a warning, so compiling on 32 bit compiler
will always generate a warning? That doesn't sound right, but I'm probably not
understanding what you mean. If I do understand then I think we should leave
the _W64 part out.

Trent :-)




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/