|
Date: Wed, 03 Dec 2014 11:24:52 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 4/4] fix a minor bug for the definition of
WINT_MIN
Am Dienstag, den 02.12.2014, 16:56 -0500 schrieb Rich Felker:
> On Tue, Dec 02, 2014 at 10:42:57PM +0100, Jens Gustedt wrote:
> > So that's probably the reason why it is burried in the arch specific
> > stuff. So I see two solutions
> >
> > - have it as I did, be symmetric, and burry it in the arch specific
> > files
> >
> > - have it in one place, but then bluntly use unsigned, UINT_MAX and 0U
> >
> > I have no personal preference for any of that.
>
> One simple definition that seems to work and naturally gets the types
> right:
>
> #define WINT_MAX 0xffffffffu
> #define WINT_MIN (WINT_MAX-WINT_MAX)
>
> Note that UINT_MAX isn't available in stdint.h; this was probably the
> original motivation for using UINT32_MAX. But spelling it out as
> 0xffffffffu explicitly works just as well.
perfect
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 ::
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
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.