[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some problems with uClibc
From: |
Bruno Haible |
Subject: |
Re: some problems with uClibc |
Date: |
Thu, 14 Apr 2011 22:31:56 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Giuseppe,
Giuseppe Scrivano wrote:
> I get exactly the same error:
>
> make[4]: Entering directory `/tmp/testdir/gltests'
> g++ -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./..
> -I../gllib -I./../gllib -MT test-wchar-c++.o -MD -MP -MF
> .deps/test-wchar-c++.Tpo -c -o test-wchar-c++.o test-wchar-c++.cc
> mv -f .deps/test-wchar-c++.Tpo .deps/test-wchar-c++.Po
> g++ -o test-wchar-c++ test-wchar-c++.o ../gllib/libgnu.a
> gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./..
> -I../gllib -I./../gllib
> --sysroot=/tmp/openrisc/toolchain/or32-linux/sys-root -MT test-wchar.o -MD
> -MP -MF .deps/test-wchar.Tpo -c -o test-wchar.o test-wchar.c
> test-wchar.c:26:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘a’
Thanks for the test. This means that the need for <stddef.h> arises because
wchar_t would otherwise not be defined. I'm committing this fix (equivalent
to your suggestion):
2011-04-14 Bruno Haible <address@hidden>
wchar: Ensure that wchar_t gets defined on uClibc.
* lib/wchar.in.h: On uClibc, include <stddef.h>.
Reported by Giuseppe Scrivano <address@hidden>.
--- lib/wchar.in.h.orig Thu Apr 14 22:29:02 2011
+++ lib/wchar.in.h Thu Apr 14 22:27:26 2011
@@ -61,9 +61,13 @@
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>.
+ In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
+ by <stddef.h>.
But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
+#endif
+#ifndef __GLIBC__
# include <stdio.h>
# include <time.h>
#endif
--
In memoriam Henk Drogt
<http://www1.yadvashem.org/yv/en/righteous/stories/drogt.asp>