1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
5 Copyright (C) 2007-2008 Free Software Foundation, Inc.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 /* Written by Eric Blake. */
24 * ISO C 99 <wchar.h> for platforms that have issues.
25 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
27 * For now, this just ensures proper prerequisite inclusion order and
28 * the declaration of wcwidth().
32 @PRAGMA_SYSTEM_HEADER@
35 #ifdef __need_mbstate_t
36 /* Special invocation convention inside uClibc header files. */
38 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
41 /* Normal invocation convention. */
45 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
47 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48 included before <wchar.h>. */
53 /* Include the original <wchar.h> if it exists.
54 Some builds of uClibc lack it. */
55 /* The include_next requires a split double-inclusion guard. */
57 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
63 /* The definition of GL_LINK_WARNING is copied here. */
70 /* Define wint_t. (Also done in wctype.in.h.) */
71 #if !@HAVE_WINT_T@ && !defined wint_t
76 /* Return the number of screen columns needed for WC. */
78 # if @REPLACE_WCWIDTH@
80 # define wcwidth rpl_wcwidth
81 extern int wcwidth (wchar_t);
83 # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
84 /* wcwidth exists but is not declared. */
85 extern int wcwidth (int /* actually wchar_t */);
88 #elif defined GNULIB_POSIXCHECK
91 (GL_LINK_WARNING ("wcwidth is unportable - " \
92 "use gnulib module wcwidth for portability"), \
101 #endif /* _GL_WCHAR_H */
102 #endif /* _GL_WCHAR_H */