~ubuntu-branches/ubuntu/wily/gsasl/wily-proposed

« back to all changes in this revision

Viewing changes to gl/wchar.in.h

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-04-14 07:26:51 UTC
  • mfrom: (2.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100414072651-hoc2231ulo8onq2x
Tags: 1.4.4-1ubuntu1
* Merge from Debian experimental (LP: #548480). Bugfix only release.
  Remaining changes:
  - debian/rules: Include clean-la.mk from cdbs to clean up the
    dependency_libs field in libgsasl.la.
* debian/control: drop libgsasl7 Depends on libgcrypt to what we have in
  Lucid (1.4.4-5). See Debian bug #564661.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
2
2
 
3
 
   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
3
   Copyright (C) 2007-2010 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
30
30
@PRAGMA_SYSTEM_HEADER@
31
31
#endif
32
32
 
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
 
33
#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
34
34
/* Special invocation convention:
35
 
   - Inside uClibc header files.
 
35
   - Inside glibc and uClibc header files.
36
36
   - On HP-UX 11.00 we have a sequence of nested includes
37
37
     <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
38
38
     once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
55
55
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
56
56
   <wchar.h>.
57
57
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
58
 
   included before <wchar.h>.  */
59
 
#include <stddef.h>
60
 
#include <stdio.h>
61
 
#include <time.h>
 
58
   included before <wchar.h>.
 
59
   But avoid namespace pollution on glibc systems.  */
 
60
#ifndef __GLIBC__
 
61
# include <stddef.h>
 
62
# include <stdio.h>
 
63
# include <time.h>
 
64
#endif
62
65
 
63
66
/* Include the original <wchar.h> if it exists.
64
67
   Some builds of uClibc lack it.  */
72
75
#ifndef _GL_WCHAR_H
73
76
#define _GL_WCHAR_H
74
77
 
75
 
/* The definition of GL_LINK_WARNING is copied here.  */
 
78
/* The definition of _GL_ARG_NONNULL is copied here.  */
 
79
 
 
80
/* The definition of _GL_WARN_ON_USE is copied here.  */
76
81
 
77
82
#ifdef __cplusplus
78
83
extern "C" {
110
115
# endif
111
116
#elif defined GNULIB_POSIXCHECK
112
117
# undef btowc
113
 
# define btowc(c) \
114
 
    (GL_LINK_WARNING ("btowc is unportable - " \
115
 
                      "use gnulib module btowc for portability"), \
116
 
     btowc (c))
 
118
# if HAVE_RAW_DECL_BTOWC
 
119
_GL_WARN_ON_USE (btowc, "btowc is unportable - "
 
120
                 "use gnulib module btowc for portability");
 
121
# endif
117
122
#endif
118
123
 
119
124
 
129
134
# endif
130
135
#elif defined GNULIB_POSIXCHECK
131
136
# undef wctob
132
 
# define wctob(w) \
133
 
    (GL_LINK_WARNING ("wctob is unportable - " \
134
 
                      "use gnulib module wctob for portability"), \
135
 
     wctob (w))
 
137
# if HAVE_RAW_DECL_WCTOB
 
138
_GL_WARN_ON_USE (wctob, "wctob is unportable - "
 
139
                 "use gnulib module wctob for portability");
 
140
# endif
136
141
#endif
137
142
 
138
143
 
147
152
# endif
148
153
#elif defined GNULIB_POSIXCHECK
149
154
# undef mbsinit
150
 
# define mbsinit(p) \
151
 
    (GL_LINK_WARNING ("mbsinit is unportable - " \
152
 
                      "use gnulib module mbsinit for portability"), \
153
 
     mbsinit (p))
 
155
# if HAVE_RAW_DECL_MBSINIT
 
156
_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
 
157
                 "use gnulib module mbsinit for portability");
 
158
# endif
154
159
#endif
155
160
 
156
161
 
165
170
# endif
166
171
#elif defined GNULIB_POSIXCHECK
167
172
# undef mbrtowc
168
 
# define mbrtowc(w,s,n,p) \
169
 
    (GL_LINK_WARNING ("mbrtowc is unportable - " \
170
 
                      "use gnulib module mbrtowc for portability"), \
171
 
     mbrtowc (w, s, n, p))
 
173
# if HAVE_RAW_DECL_MBRTOWC
 
174
_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
 
175
                 "use gnulib module mbrtowc for portability");
 
176
# endif
172
177
#endif
173
178
 
174
179
 
183
188
# endif
184
189
#elif defined GNULIB_POSIXCHECK
185
190
# undef mbrlen
186
 
# define mbrlen(s,n,p) \
187
 
    (GL_LINK_WARNING ("mbrlen is unportable - " \
188
 
                      "use gnulib module mbrlen for portability"), \
189
 
     mbrlen (s, n, p))
 
191
# if HAVE_RAW_DECL_MBRLEN
 
192
_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
 
193
                 "use gnulib module mbrlen for portability");
 
194
# endif
190
195
#endif
191
196
 
192
197
 
197
202
#  define mbsrtowcs rpl_mbsrtowcs
198
203
# endif
199
204
# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
200
 
extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
 
205
extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
 
206
     _GL_ARG_NONNULL ((2));
201
207
# endif
202
208
#elif defined GNULIB_POSIXCHECK
203
209
# undef mbsrtowcs
204
 
# define mbsrtowcs(d,s,l,p) \
205
 
    (GL_LINK_WARNING ("mbsrtowcs is unportable - " \
206
 
                      "use gnulib module mbsrtowcs for portability"), \
207
 
     mbsrtowcs (d, s, l, p))
 
210
# if HAVE_RAW_DECL_MBSRTOWCS
 
211
_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
 
212
                 "use gnulib module mbsrtowcs for portability");
 
213
# endif
208
214
#endif
209
215
 
210
216
 
215
221
#  define mbsnrtowcs rpl_mbsnrtowcs
216
222
# endif
217
223
# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
218
 
extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
 
224
extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)
 
225
     _GL_ARG_NONNULL ((2));
219
226
# endif
220
227
#elif defined GNULIB_POSIXCHECK
221
228
# undef mbsnrtowcs
222
 
# define mbsnrtowcs(d,s,n,l,p) \
223
 
    (GL_LINK_WARNING ("mbsnrtowcs is unportable - " \
224
 
                      "use gnulib module mbsnrtowcs for portability"), \
225
 
     mbsnrtowcs (d, s, n, l, p))
 
229
# if HAVE_RAW_DECL_MBSNRTOWCS
 
230
_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
 
231
                 "use gnulib module mbsnrtowcs for portability");
 
232
# endif
226
233
#endif
227
234
 
228
235
 
237
244
# endif
238
245
#elif defined GNULIB_POSIXCHECK
239
246
# undef wcrtomb
240
 
# define wcrtomb(s,w,p) \
241
 
    (GL_LINK_WARNING ("wcrtomb is unportable - " \
242
 
                      "use gnulib module wcrtomb for portability"), \
243
 
     wcrtomb (s, w, p))
 
247
# if HAVE_RAW_DECL_WCRTOMB
 
248
_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
 
249
                 "use gnulib module wcrtomb for portability");
 
250
# endif
244
251
#endif
245
252
 
246
253
 
251
258
#  define wcsrtombs rpl_wcsrtombs
252
259
# endif
253
260
# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
254
 
extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
 
261
extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
 
262
     _GL_ARG_NONNULL ((2));
255
263
# endif
256
264
#elif defined GNULIB_POSIXCHECK
257
265
# undef wcsrtombs
258
 
# define wcsrtombs(d,s,l,p) \
259
 
    (GL_LINK_WARNING ("wcsrtombs is unportable - " \
260
 
                      "use gnulib module wcsrtombs for portability"), \
261
 
     wcsrtombs (d, s, l, p))
 
266
# if HAVE_RAW_DECL_WCSRTOMBS
 
267
_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
 
268
                 "use gnulib module wcsrtombs for portability");
 
269
# endif
262
270
#endif
263
271
 
264
272
 
269
277
#  define wcsnrtombs rpl_wcsnrtombs
270
278
# endif
271
279
# if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
272
 
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
 
280
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)
 
281
     _GL_ARG_NONNULL ((2));
273
282
# endif
274
283
#elif defined GNULIB_POSIXCHECK
275
284
# undef wcsnrtombs
276
 
# define wcsnrtombs(d,s,n,l,p) \
277
 
    (GL_LINK_WARNING ("wcsnrtombs is unportable - " \
278
 
                      "use gnulib module wcsnrtombs for portability"), \
279
 
     wcsnrtombs (d, s, n, l, p))
 
285
# if HAVE_RAW_DECL_WCSNRTOMBS
 
286
_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
 
287
                 "use gnulib module wcsnrtombs for portability");
 
288
# endif
280
289
#endif
281
290
 
282
291
 
294
303
# endif
295
304
#elif defined GNULIB_POSIXCHECK
296
305
# undef wcwidth
297
 
# define wcwidth(w) \
298
 
    (GL_LINK_WARNING ("wcwidth is unportable - " \
299
 
                      "use gnulib module wcwidth for portability"), \
300
 
     wcwidth (w))
 
306
# if HAVE_RAW_DECL_WCWIDTH
 
307
_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
 
308
                 "use gnulib module wcwidth for portability");
 
309
# endif
301
310
#endif
302
311
 
303
312