annotate lib/wchar.in.h @ 286:701132971855 2.3

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