Re: [AD] PATCH: updated mprotect patch for allegro-4.2.1 which also work on Linux

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


On Tuesday 14 March 2006 00:28, Hans de Goede wrote:
> I think so too, but there is also lots of newer code which asumes sizeof
> long == sizeof(void *) so they are not helping themselves I believe.

A lot of code also assumes sizeof(int) == 4 and sizeof(long) == 4. Something's 
obviously going to break, and I think compiler makers decided leaving 
sizeof(int) == 4 would break less code than not (poeple use int more than 
long). C99's [u]int[8|16|32|64]_t typedefs were made so you had standard 
typedefs with gauranteed sizes and help ensure 32/64-bit compatible code 
(MSVC has the internal types __int[8|16|32|64], but it was never part of any 
standard, and C99's is more encompassing).

And yes, MSVC does have BYTE, WORD, DWORD, and QWORD, but these are always 
unsigned, so you're out of luck if you need signed values.




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