Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 15 Jan 2016 21:11:25 +0000
From: Josiah Worcester <josiahw@...il.com>
To: musl@...ts.openwall.com
Subject: Re: the size of the int type

I do not know of anything in musl that assumes "int" is 32-bit, but I'm
confident that implementing it as anything else will break a large amount
of third party code. Practically all platforms in common use have 32-bit
int (regardless of the machine's word size), and as such a lot of code
relies on this (implicitly or explicitly).
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.

On Fri, Jan 15, 2016 at 1:01 PM Max Ruttenberg <
mruttenberg@...technology.com> wrote:

> Hi,
>
> I'm wondering if there's any code in musl that makes assumptions on the
> size of the "int" type.
>
> I only ask because I'm debating how my compiler (which targets a machine
> with a 64-bit word size) should define the int type. Ideally I'd like to
> break as little library code as possible.
>
> Max
>

Content of type "text/html" skipped

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.