annotate lib/wchar.in.h @ 448:5cccf90bf838 3.0 tip

Fixed bug with complex external references generating invalid relocations in the object file
author lost@l-w.ca
date Fri, 05 Nov 2010 22:27:00 -0600
parents b8bf63962a99
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
434
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
1 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
2
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
3 Copyright (C) 2007-2010 Free Software Foundation, Inc.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
4
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
7 the Free Software Foundation; either version 3, or (at your option)
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
8 any later version.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
9
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
13 GNU General Public License for more details.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
14
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
18
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
19 /* Written by Eric Blake. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
20
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
21 /*
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
22 * ISO C 99 <wchar.h> for platforms that have issues.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
23 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
24 *
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
25 * For now, this just ensures proper prerequisite inclusion order and
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
26 * the declaration of wcwidth().
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
27 */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
28
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
29 #if __GNUC__ >= 3
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
30 @PRAGMA_SYSTEM_HEADER@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
31 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
32
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
33 #if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
34 /* Special invocation convention:
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
35 - Inside uClibc header files.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
36 - On HP-UX 11.00 we have a sequence of nested includes
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
37 <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
38 once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
39 and once directly. In both situations 'wint_t' is not yet defined,
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
40 therefore we cannot provide the function overrides; instead include only
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
41 the system's <wchar.h>.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
42 - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
43 the latter includes <wchar.h>. But here, we have no way to detect whether
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
44 <wctype.h> is completely included or is still being included. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
45
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
46 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
47
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
48 #else
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
49 /* Normal invocation convention. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
50
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
51 #ifndef _GL_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
52
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
53 #define _GL_ALREADY_INCLUDING_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
54
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
55 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
56 <wchar.h>.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
57 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
58 included before <wchar.h>.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
59 But avoid namespace pollution on glibc systems. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
60 #ifndef __GLIBC__
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
61 # include <stddef.h>
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
62 # include <stdio.h>
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
63 # include <time.h>
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
64 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
65
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
66 /* Include the original <wchar.h> if it exists.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
67 Some builds of uClibc lack it. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
68 /* The include_next requires a split double-inclusion guard. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
69 #if @HAVE_WCHAR_H@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
70 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
71 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
72
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
73 #undef _GL_ALREADY_INCLUDING_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
74
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
75 #ifndef _GL_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
76 #define _GL_WCHAR_H
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
77
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
78 /* The definition of GL_LINK_WARNING is copied here. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
79
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
80 /* The definition of _GL_ARG_NONNULL is copied here. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
81
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
82 #ifdef __cplusplus
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
83 extern "C" {
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
84 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
85
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
86
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
87 /* Define wint_t. (Also done in wctype.in.h.) */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
88 #if !@HAVE_WINT_T@ && !defined wint_t
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
89 # define wint_t int
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
90 # ifndef WEOF
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
91 # define WEOF -1
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
92 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
93 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
94
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
95
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
96 /* Override mbstate_t if it is too small.
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
97 On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
98 implementing mbrtowc for encodings like UTF-8. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
99 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
100 typedef int rpl_mbstate_t;
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
101 # undef mbstate_t
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
102 # define mbstate_t rpl_mbstate_t
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
103 # define GNULIB_defined_mbstate_t 1
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
104 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
105
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
106
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
107 /* Convert a single-byte character to a wide character. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
108 #if @GNULIB_BTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
109 # if @REPLACE_BTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
110 # undef btowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
111 # define btowc rpl_btowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
112 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
113 # if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
114 extern wint_t btowc (int c);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
115 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
116 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
117 # undef btowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
118 # define btowc(c) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
119 (GL_LINK_WARNING ("btowc is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
120 "use gnulib module btowc for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
121 btowc (c))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
122 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
123
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
124
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
125 /* Convert a wide character to a single-byte character. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
126 #if @GNULIB_WCTOB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
127 # if @REPLACE_WCTOB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
128 # undef wctob
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
129 # define wctob rpl_wctob
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
130 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
131 # if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
132 /* wctob is provided by gnulib, or wctob exists but is not declared. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
133 extern int wctob (wint_t wc);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
134 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
135 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
136 # undef wctob
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
137 # define wctob(w) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
138 (GL_LINK_WARNING ("wctob is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
139 "use gnulib module wctob for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
140 wctob (w))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
141 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
142
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
143
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
144 /* Test whether *PS is in the initial state. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
145 #if @GNULIB_MBSINIT@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
146 # if @REPLACE_MBSINIT@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
147 # undef mbsinit
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
148 # define mbsinit rpl_mbsinit
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
149 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
150 # if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
151 extern int mbsinit (const mbstate_t *ps);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
152 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
153 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
154 # undef mbsinit
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
155 # define mbsinit(p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
156 (GL_LINK_WARNING ("mbsinit is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
157 "use gnulib module mbsinit for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
158 mbsinit (p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
159 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
160
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
161
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
162 /* Convert a multibyte character to a wide character. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
163 #if @GNULIB_MBRTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
164 # if @REPLACE_MBRTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
165 # undef mbrtowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
166 # define mbrtowc rpl_mbrtowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
167 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
168 # if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
169 extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
170 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
171 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
172 # undef mbrtowc
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
173 # define mbrtowc(w,s,n,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
174 (GL_LINK_WARNING ("mbrtowc is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
175 "use gnulib module mbrtowc for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
176 mbrtowc (w, s, n, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
177 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
178
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
179
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
180 /* Recognize a multibyte character. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
181 #if @GNULIB_MBRLEN@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
182 # if @REPLACE_MBRLEN@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
183 # undef mbrlen
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
184 # define mbrlen rpl_mbrlen
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
185 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
186 # if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
187 extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
188 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
189 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
190 # undef mbrlen
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
191 # define mbrlen(s,n,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
192 (GL_LINK_WARNING ("mbrlen is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
193 "use gnulib module mbrlen for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
194 mbrlen (s, n, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
195 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
196
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
197
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
198 /* Convert a string to a wide string. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
199 #if @GNULIB_MBSRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
200 # if @REPLACE_MBSRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
201 # undef mbsrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
202 # define mbsrtowcs rpl_mbsrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
203 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
204 # if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
205 extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
206 _GL_ARG_NONNULL ((2));
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
207 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
208 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
209 # undef mbsrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
210 # define mbsrtowcs(d,s,l,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
211 (GL_LINK_WARNING ("mbsrtowcs is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
212 "use gnulib module mbsrtowcs for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
213 mbsrtowcs (d, s, l, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
214 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
215
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
216
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
217 /* Convert a string to a wide string. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
218 #if @GNULIB_MBSNRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
219 # if @REPLACE_MBSNRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
220 # undef mbsnrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
221 # define mbsnrtowcs rpl_mbsnrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
222 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
223 # if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
224 extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
225 _GL_ARG_NONNULL ((2));
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
226 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
227 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
228 # undef mbsnrtowcs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
229 # define mbsnrtowcs(d,s,n,l,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
230 (GL_LINK_WARNING ("mbsnrtowcs is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
231 "use gnulib module mbsnrtowcs for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
232 mbsnrtowcs (d, s, n, l, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
233 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
234
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
235
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
236 /* Convert a wide character to a multibyte character. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
237 #if @GNULIB_WCRTOMB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
238 # if @REPLACE_WCRTOMB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
239 # undef wcrtomb
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
240 # define wcrtomb rpl_wcrtomb
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
241 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
242 # if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
243 extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
244 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
245 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
246 # undef wcrtomb
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
247 # define wcrtomb(s,w,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
248 (GL_LINK_WARNING ("wcrtomb is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
249 "use gnulib module wcrtomb for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
250 wcrtomb (s, w, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
251 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
252
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
253
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
254 /* Convert a wide string to a string. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
255 #if @GNULIB_WCSRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
256 # if @REPLACE_WCSRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
257 # undef wcsrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
258 # define wcsrtombs rpl_wcsrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
259 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
260 # if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
261 extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
262 _GL_ARG_NONNULL ((2));
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
263 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
264 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
265 # undef wcsrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
266 # define wcsrtombs(d,s,l,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
267 (GL_LINK_WARNING ("wcsrtombs is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
268 "use gnulib module wcsrtombs for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
269 wcsrtombs (d, s, l, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
270 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
271
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
272
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
273 /* Convert a wide string to a string. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
274 #if @GNULIB_WCSNRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
275 # if @REPLACE_WCSNRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
276 # undef wcsnrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
277 # define wcsnrtombs rpl_wcsnrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
278 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
279 # if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
280 extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
281 _GL_ARG_NONNULL ((2));
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
282 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
283 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
284 # undef wcsnrtombs
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
285 # define wcsnrtombs(d,s,n,l,p) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
286 (GL_LINK_WARNING ("wcsnrtombs is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
287 "use gnulib module wcsnrtombs for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
288 wcsnrtombs (d, s, n, l, p))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
289 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
290
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
291
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
292 /* Return the number of screen columns needed for WC. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
293 #if @GNULIB_WCWIDTH@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
294 # if @REPLACE_WCWIDTH@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
295 # undef wcwidth
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
296 # define wcwidth rpl_wcwidth
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
297 extern int wcwidth (wchar_t);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
298 # else
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
299 # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
300 /* wcwidth exists but is not declared. */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
301 extern int wcwidth (int /* actually wchar_t */);
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
302 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
303 # endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
304 #elif defined GNULIB_POSIXCHECK
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
305 # undef wcwidth
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
306 # define wcwidth(w) \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
307 (GL_LINK_WARNING ("wcwidth is unportable - " \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
308 "use gnulib module wcwidth for portability"), \
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
309 wcwidth (w))
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
310 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
311
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
312
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
313 #ifdef __cplusplus
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
314 }
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
315 #endif
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
316
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
317 #endif /* _GL_WCHAR_H */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
318 #endif /* _GL_WCHAR_H */
b8bf63962a99 Added various generated files for release
lost@l-w.ca
parents:
diff changeset
319 #endif