Re: [AD] Allegro on 64-bit platforms

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


this is proposal is very important.

i found this on google:

"Under Win64, C/C++ code follows the P64 data model, which specifies that int and long are implemented in 32 bits and pointer is implemented in 64 bits."

but in GCC you are saying the  long is 64bit.

how is this going to be documented  so users do not get confused.

i prefer (u)int64_t (u)int32_t to be used everywhere, so as not to confuse anyone; and there only needs to be one set of docs.





Now that 64-bit computing is becoming mainstream thanks to AMD64, I think it
is time to make Allegro 64-bit clean.  The library already compiles with GCC
in strict mode on AMD64/Linux (thanks to Philipp Thomas from SUSE) but I
don't think it really works.  It also compiles on SPARC64/Solaris.

The first goal is to make it work with GCC.  On 64-bit platforms, GCC is
almost always LP64 (32-bit int, 64-bit long, 64-bit pointer).  I've attached
the (purged of noise) result of grep "long" on allegro._tx.  The good news
is that there are not many problems; but some are deeply rooted in the
library (e.g. the use of 'long' for 32-bit pixel values).

I think a reasonable approach is to try not to make incompatible changes on
32-bit platforms and break compatibility as much as we need on 64-bit
platforms.  We could even think of backporting the work to the stable
branch.

--
Eric Botcazou





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