[uClibc] runtime fix for correct casts

Manuel Novoa III mjn3 at codepoet.org
Thu Feb 5 02:36:18 UTC 2004


Hello,

On Wed, Feb 04, 2004 at 10:10:44PM +0000, Alan Hourihane wrote:
> I need this to build correctly on 64bit platforms.
> 
> Alan.
> 
> --- extra/locale/gen_wctype.c.old	2004-02-04 22:08:55.000000000 +0000
> +++ extra/locale/gen_wctype.c	2004-02-04 22:09:00.000000000 +0000
> @@ -442,8 +442,8 @@
>  			}
>  			wct[c/2] |= d;
>  
> -			l = towlower(c) - c;
> -			u = towupper(c) - c;
> +			l = (long)(int) towlower(c) - c;
> +			u = (long)(int) towupper(c) - c;
>  			ult[c] = 0;
>  			if (l || u) {
>  				if ((l != (short)l) || (u != (short)u)) {

Well, I'll apply it for now.  But if all goes well, by April the world
will finally be rid of this truly awful code.  :-)

Manuel



More information about the uClibc mailing list