Reduce code duplication.
[gnulib.git] / lib / wchar.in.h
index 924a338..606a70a 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
  * the declaration of wcwidth().
  */
 
+@PRAGMA_SYSTEM_HEADER@
+
+#ifdef __need_mbstate_t
+/* Special invocation convention inside uClibc header files.  */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention.  */
+
 #ifndef _GL_WCHAR_H
 
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -53,6 +63,12 @@ extern "C" {
 #endif
 
 
+/* Define wint_t.  (Also done in wctype.in.h.)  */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+#endif
+
+
 /* Return the number of screen columns needed for WC.  */
 #if @GNULIB_WCWIDTH@
 # if @REPLACE_WCWIDTH@
@@ -80,3 +96,4 @@ extern int wcwidth (int /* actually wchar_t */);
 
 #endif /* _GL_WCHAR_H */
 #endif /* _GL_WCHAR_H */
+#endif