New modules unistr/u*-mbsnlen.
[gnulib.git] / lib / wchar_.h
index f58af2f..6e04ccc 100644 (file)
  * For now, this just ensures proper prerequisite inclusion order.
  */
 
-#if @HAVE_INCLUDE_NEXT@
-# include <stdio.h>
-# include_next <wchar.h>
-#endif
-
 #ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
 
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
 #include <stdio.h>
 #include <time.h>
 
-/* Include the original <wchar.h>.  */
-#if ! @HAVE_INCLUDE_NEXT@
-# include @ABSOLUTE_WCHAR_H@
+/* Include the original <wchar.h> if it exists.
+   Some builds of uClibc lack it.  */
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_WCHAR_H@
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <wchar.h>
+# else
+#  include @ABSOLUTE_WCHAR_H@
+# endif
 #endif
 
+#ifndef _GL_WCHAR_H
+#define _GL_WCHAR_H
+
+#endif /* _GL_WCHAR_H */
 #endif /* _GL_WCHAR_H */