mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Josiah Worcester <josiahw@gmail.com>
To: musl@lists.openwall.com
Subject: Re: the size of the int type
Date: Fri, 15 Jan 2016 21:11:25 +0000	[thread overview]
Message-ID: <CAMAJcuDcB3PG1NSXr69bPTHvQmOdZtXEghR4+OnidfzfpQCTpw@mail.gmail.com> (raw)
In-Reply-To: <CAD+Cw=cpuWsDf9R44zNx5-96nd6FB=MoNsekBNVUbBo-_eCv_w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

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@emutechnology.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
>

[-- Attachment #2: Type: text/html, Size: 1400 bytes --]

  reply	other threads:[~2016-01-15 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 21:01 Max Ruttenberg
2016-01-15 21:11 ` Josiah Worcester [this message]
2016-01-15 21:19   ` Max Ruttenberg
2016-01-16 11:09   ` croco
2016-01-16 13:09     ` Jens Gustedt
2016-01-18 15:22       ` Max Ruttenberg
2016-01-15 21:33 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMAJcuDcB3PG1NSXr69bPTHvQmOdZtXEghR4+OnidfzfpQCTpw@mail.gmail.com \
    --to=josiahw@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).