Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 16 Jan 2016 14:09:17 +0300
From: croco@...nwall.com
To: musl@...ts.openwall.com
Subject: Re: the size of the int type

On Fri, Jan 15, 2016 at 09:11:25PM +0000, Josiah Worcester wrote:

> You would do better to match the convention used on modern-day Unix
> systems, where int is 32-bit, long is the machine word size, and long long
> is 64-bit. If you do this everything should pretty much function as it
> expects, with regard to the standard C types' sizes.

Let me second this.  Please note that in case you implement int as 64-bit,
then there will be either no 32-bit or no 16-bit integer type (at all), as
there's only the short which is in between char ant int; hence, well, there
will be a kind of problem with some typedefs from <stdint.h>: either
int16_t/uint16_t or int32_t/uint32_t will actually have a size different
from what the name suggests, so you'll run into a trouble with
reading/analysing data in binary formats.



--
Croco

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.