[uClibc]wchar error

Miles Bader miles at lsi.nec.co.jp
Thu Jul 4 09:09:39 UTC 2002


When compiling today's CVS, I got the following error:

   ...
   make -C  locale
   make[3]: Entering directory `/proj/soft2/uclinux/uclibc/build/ma1/libc/misc/locale'
   v850e-elf-gcc -Wall -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -Os -fno-builtin -nostdinc  -I../../../include -iwithprefix include -I. -D_LIBC  -g -DNDEBUG -DL_setlocale locale.c -c -o setlocale.o
   In file included from ../../../include/locale.h:30,
                    from locale.c:25:
   ../../../include/bits/uClibc_locale.h:73: parse error before `__uwchar_t'
   ../../../include/bits/uClibc_locale.h:73: warning: type defaults to `int' in declaration of `__uwchar_t'
   ../../../include/bits/uClibc_locale.h:73: warning: data definition has no type or storage class
   make[3]: *** [setlocale.o] Error 1
   make[3]: Leaving directory `/proj/soft2/uclinux/uclibc/build/ma1/libc/misc/locale'
   make[2]: *** [_dir_locale] Error 2
   make[2]: Leaving directory `/proj/soft2/uclinux/uclibc/build/ma1/libc/misc'
   make[1]: *** [_dir_misc] Error 2
   make[1]: Leaving directory `/proj/soft2/uclinux/uclibc/build/ma1/libc'
   make: *** [_dir_libc] Error 2


I worked around it using the following patch:


Index: libc/sysdeps/linux/common/bits/uClibc_locale.h
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/bits/uClibc_locale.h,v
retrieving revision 1.2
diff -u -r1.2 uClibc_locale.h
--- libc/sysdeps/linux/common/bits/uClibc_locale.h	3 Jul 2002 17:24:17 -0000	1.2
+++ libc/sysdeps/linux/common/bits/uClibc_locale.h	4 Jul 2002 09:09:12 -0000
@@ -63,11 +63,12 @@
 #define __LC_ALL			6
 
 /**********************************************************************/
-#ifdef _LIBC
+#if defined (_LIBC) && defined (__WCHAR_ENABLED)
 
 /* TODO: This really needs to be somewhere else... */
 #include <limits.h>
 #include <stdint.h>
+#include <wchar.h>
 
 #if WCHAR_MIN == 0
 typedef wchar_t				__uwchar_t;


-Miles
-- 
[|nurgle|]  ddt- demonic? so quake will have an evil kinda setting? one that 
            will  make every christian in the world foamm at the mouth? 
[iddt]      nurg, that's the goal 





More information about the uClibc mailing list