wchar: Ensure that wchar_t gets defined on uClibc.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Apr 2011 20:29:41 +0000 (22:29 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 14 Apr 2011 20:29:41 +0000 (22:29 +0200)
* lib/wchar.in.h: On uClibc, include <stddef.h>.
Reported by Giuseppe Scrivano <gscrivano@gnu.org>.

ChangeLog
lib/wchar.in.h

index 09f68af..349e5fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-14  Bruno Haible  <bruno@clisp.org>
+
+       wchar: Ensure that wchar_t gets defined on uClibc.
+       * lib/wchar.in.h: On uClibc, include <stddef.h>.
+       Reported by Giuseppe Scrivano <gscrivano@gnu.org>.
+
 2011-04-13  Bruno Haible  <bruno@clisp.org>
 
        safe-write, full-read: Avoid unnecessary compilation units.
index d2bf17d..c7f306a 100644 (file)
    <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