mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: [PATCH 4/4] fix a minor bug for the definition of WINT_MIN
Date: Tue, 02 Dec 2014 20:23:18 +0100	[thread overview]
Message-ID: <1417548198.4936.1108.camel@eris.loria.fr> (raw)
In-Reply-To: <20141202180633.GE29621@brightrain.aerifal.cx>

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

Am Dienstag, den 02.12.2014, 13:06 -0500 schrieb Rich Felker:
> On Tue, Nov 25, 2014 at 03:50:17PM +0100, Jens Gustedt wrote:
> > This must be an unsigned value.
> > ---
> >  include/stdint.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/stdint.h b/include/stdint.h
> > index 8b91163..8b81ca0 100644
> > --- a/include/stdint.h
> > +++ b/include/stdint.h
> > @@ -78,7 +78,7 @@ typedef uint64_t uint_least64_t;
> >  #define INTMAX_MAX  INT64_MAX
> >  #define UINTMAX_MAX UINT64_MAX
> >  
> > -#define WINT_MIN 0
> > +#define WINT_MIN (+_UINTEGER_C(uint32_t, 0))
> >  #define WINT_MAX UINT32_MAX
> 
> Indeed, but 0U would be a much nicer way of writing it.

But this would be wrong on platforms with 16 bit int, no?

> Also I'm wondering why I have wint_t in the arch-specific
> alltypes.h.in files if stdint.h is assuming the type is
> unsigned/32-bit, and it actually is for all archs. Perhaps we should
> move it into the shared part of alltypes.h.in?

don't we have archs with 16 bit int?

but right, even then we could move it up and define it as uint32_t

Jens

-- 
:: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2014-12-02 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 14:50 Jens Gustedt
2014-12-02 18:06 ` Rich Felker
2014-12-02 19:23   ` Jens Gustedt [this message]
2014-12-02 19:47     ` Rich Felker
2014-12-02 21:42       ` Jens Gustedt
2014-12-02 21:56         ` Rich Felker
2014-12-03 10:24           ` Jens Gustedt

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=1417548198.4936.1108.camel@eris.loria.fr \
    --to=jens.gustedt@inria.fr \
    --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).