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: "Robert Ohannessian" <ROhannessian@xxxxxxxxxx>
- Date: Tue, 14 Mar 2006 07:01:05 -0800
- Thread-index: AcZHQej36VvFY067Seyf31jHgt8EcgANctBA
- Thread-topic: [AD] PATCH: updated mprotect patch for allegro-4.2.1 which also work on Linux
ints must also be at least 16-bits long, according to the C standard.
ints don't need to be the fastest or least size or any combination of
the two: They may not even be natively supported on the target machine.
The C standard recommends that they are of "natural size suggested by
the
architecture of the execution environment" (6.2.5.5), but does not
require them to be of any particular size.
> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Hans de Goede
> Sent: Tuesday, March 14, 2006 2:28 AM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] PATCH: updated mprotect patch for allegro-4.2.1
which
> also work on Linux
>
>
>
> Evert Glebbeek wrote:
> >> Normal conventions say that sizeof(long) is the largest integer an
arch
> >> can represent unless sizeof(int) is larger then that in which case
> >> sizeof(long) == sizeof(int)
> >
> > It is my understanding that int is (was?) the machine's native
integer
> size,
> > ie, 16 bit on 16 bit machines, 32 bit on 32 bit machines and 64 bit
on
> 64 bit
> > machines. 64 bit PC's already differ from this by having int as a 32
bit
> > type.
>
> Nope, AFAIK int is the optimal iow best speed/size tradeof integer
size
> (which the machine preferably can represent nativly, exception to this
> are microcontrollers which are typically 8 bit, yet have 16 bits ints,
> because 8 bit is deemed to small).
>
> > I think this is also part of the reason for Microsoft sticking with
32
> bit
> > long: there's a lot of Windows-specific code floating around that
thinks
> a
> > long is 32 bit for historical reasons. On the other hand, I think MS
> also
> > used typedefs such as BYTE, WORD, DWORD (and QWORD?), so I don't
really
> see
> > why they cannot just update their typedefs...
> >
>
> 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.
>
> >> long long is not a C basis type.
> >
> > It is in C99.
> >
>
> Ok, I'm more of an ANSI (C89) person.
>
> Regards,
>
> Hans
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers