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
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] PATCH: updated mprotect patch for allegro-4.2.1 which also work on Linux
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Tue, 14 Mar 2006 01:43:39 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=ADflGJyZNgNqK2F8ufqt4lVo6ngmkMJvJmzmxukl6CTFYTSrGyzyoYp3DwmBwsvvmZoW7yTPkkr1YqZF1mbBqTglnPfjV0a2c6zgpt+2auP1mPqMzI2/OCTXqKNzB4IU6x5NnLvRJgM0fETr8kGwYmoPDvlan41Lg37CMQ1Z8DY=
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.