Re: [AD] WIP 4.1.15 and CVS freeze

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


> Along that, we can athen lso get rid of all "long" values,
> since that type makes little sense, given it is the same as int on most
> 32-bit platforms (and probably 64-bit as well).

No, any sane compiler makes it so that '(unsigned) long' can hold pointer
values and, in order not to double the memory requirement for every single
program, keeps 'int' as a 32-bit type.  This means LP64 on true 64-bit
platforms, so sizeof(int) != sizeof(long) there.  The only exception is MSVC
for Windows 64-bit, which is P64: 'long' are 32-bit there too.  Major
compatibility problem with the Unix world.

That's why there is the line
- fix use of 32-bit 'long' on 64-bit platforms
in the TODO file: we need to untangle uses of 'long' as a 32-bit type
(typically, 32-bit pixel values) from uses of 'long' as a pointer-like type.
The former must be downgraded to a 32-bit type everywhere (probably 'int')
while the latter are fine.  Or would have been fine without MSVC for Win64.

--
Eric Botcazou






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