[uClibc] runtime fix for correct casts

Alan Hourihane alanh at fairlite.demon.co.uk
Wed Feb 4 22:10:44 UTC 2004


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)) {



More information about the uClibc mailing list