aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2011-04-21 16:19:06 -0700
committerPaul Eggert2011-04-21 16:19:06 -0700
commit36009a21cb540401591a4891e05e1c4b32a8c593 (patch)
tree117c9aab837947294f51e3762c511e25831bbef3 /lib
parentbc0a5c13baf196e0f4b1554425459cdb6665fbc5 (diff)
downloademacs-36009a21cb540401591a4891e05e1c4b32a8c593.tar.gz
emacs-36009a21cb540401591a4891e05e1c4b32a8c593.zip
* lib/wchar.h, lib/inttypes.h: Remove; not needed.
Diffstat (limited to 'lib')
-rw-r--r--lib/inttypes.h1165
-rw-r--r--lib/wchar.h1306
2 files changed, 0 insertions, 2471 deletions
diff --git a/lib/inttypes.h b/lib/inttypes.h
deleted file mode 100644
index 8e09e8a63c3..00000000000
--- a/lib/inttypes.h
+++ /dev/null
@@ -1,1165 +0,0 @@
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 Written by Paul Eggert, Bruno Haible, Derek Price.
4 This file is part of gnulib.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19/*
20 * ISO C 99 <inttypes.h> for platforms that lack it.
21 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
22 */
23
24#if __GNUC__ >= 3
25#pragma GCC system_header
26#endif
27
28
29/* Include the original <inttypes.h> if it exists, and if this file
30 has not been included yet or if this file includes gnulib stdint.h
31 which in turn includes this file.
32 The include_next requires a split double-inclusion guard. */
33#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
34# if 1
35# include_next <inttypes.h>
36# endif
37#endif
38
39#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
40#define INTTYPES_H
41
42/* Include <stdint.h> or the gnulib replacement.
43 But avoid namespace pollution on glibc systems. */
44#ifndef __GLIBC__
45# include <stdint.h>
46#endif
47/* Get CHAR_BIT. */
48#include <limits.h>
49
50#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
51# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
52#endif
53
54/* The definition of _GL_ARG_NONNULL is copied here. */
55/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
56 that the values passed as arguments n, ..., m must be non-NULL pointers.
57 n = 1 stands for the first argument, n = 2 for the second argument etc. */
58#ifndef _GL_ARG_NONNULL
59# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
60# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
61# else
62# define _GL_ARG_NONNULL(params)
63# endif
64#endif
65
66/* The definition of _GL_WARN_ON_USE is copied here. */
67#ifndef _GL_WARN_ON_USE
68
69# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
70/* A compiler attribute is available in gcc versions 4.3.0 and later. */
71# define _GL_WARN_ON_USE(function, message) \
72extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
73# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
74/* Verify the existence of the function. */
75# define _GL_WARN_ON_USE(function, message) \
76extern __typeof__ (function) function
77# else /* Unsupported. */
78# define _GL_WARN_ON_USE(function, message) \
79_GL_WARN_EXTERN_C int _gl_warn_on_use
80# endif
81#endif
82
83/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
84 is like _GL_WARN_ON_USE (function, "string"), except that the function is
85 declared with the given prototype, consisting of return type, parameters,
86 and attributes.
87 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
88 not work in this case. */
89#ifndef _GL_WARN_ON_USE_CXX
90# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
91# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
92extern rettype function parameters_and_attributes \
93 __attribute__ ((__warning__ (msg)))
94# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
95/* Verify the existence of the function. */
96# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
97extern rettype function parameters_and_attributes
98# else /* Unsupported. */
99# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
100_GL_WARN_EXTERN_C int _gl_warn_on_use
101# endif
102#endif
103
104/* _GL_WARN_EXTERN_C declaration;
105 performs the declaration with C linkage. */
106#ifndef _GL_WARN_EXTERN_C
107# if defined __cplusplus
108# define _GL_WARN_EXTERN_C extern "C"
109# else
110# define _GL_WARN_EXTERN_C extern
111# endif
112#endif
113
114/* 7.8.1 Macros for format specifiers */
115
116#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
117
118# if defined _TNS_R_TARGET
119 /* Tandem NonStop R series and compatible platforms released before
120 July 2005 support %Ld but not %lld. */
121# define _LONG_LONG_FORMAT_PREFIX "L"
122# else
123# define _LONG_LONG_FORMAT_PREFIX "ll"
124# endif
125
126# if !defined PRId8 || 0
127# undef PRId8
128# ifdef INT8_MAX
129# define PRId8 "d"
130# endif
131# endif
132# if !defined PRIi8 || 0
133# undef PRIi8
134# ifdef INT8_MAX
135# define PRIi8 "i"
136# endif
137# endif
138# if !defined PRIo8 || 0
139# undef PRIo8
140# ifdef UINT8_MAX
141# define PRIo8 "o"
142# endif
143# endif
144# if !defined PRIu8 || 0
145# undef PRIu8
146# ifdef UINT8_MAX
147# define PRIu8 "u"
148# endif
149# endif
150# if !defined PRIx8 || 0
151# undef PRIx8
152# ifdef UINT8_MAX
153# define PRIx8 "x"
154# endif
155# endif
156# if !defined PRIX8 || 0
157# undef PRIX8
158# ifdef UINT8_MAX
159# define PRIX8 "X"
160# endif
161# endif
162# if !defined PRId16 || 0
163# undef PRId16
164# ifdef INT16_MAX
165# define PRId16 "d"
166# endif
167# endif
168# if !defined PRIi16 || 0
169# undef PRIi16
170# ifdef INT16_MAX
171# define PRIi16 "i"
172# endif
173# endif
174# if !defined PRIo16 || 0
175# undef PRIo16
176# ifdef UINT16_MAX
177# define PRIo16 "o"
178# endif
179# endif
180# if !defined PRIu16 || 0
181# undef PRIu16
182# ifdef UINT16_MAX
183# define PRIu16 "u"
184# endif
185# endif
186# if !defined PRIx16 || 0
187# undef PRIx16
188# ifdef UINT16_MAX
189# define PRIx16 "x"
190# endif
191# endif
192# if !defined PRIX16 || 0
193# undef PRIX16
194# ifdef UINT16_MAX
195# define PRIX16 "X"
196# endif
197# endif
198# if !defined PRId32 || 0
199# undef PRId32
200# ifdef INT32_MAX
201# define PRId32 "d"
202# endif
203# endif
204# if !defined PRIi32 || 0
205# undef PRIi32
206# ifdef INT32_MAX
207# define PRIi32 "i"
208# endif
209# endif
210# if !defined PRIo32 || 0
211# undef PRIo32
212# ifdef UINT32_MAX
213# define PRIo32 "o"
214# endif
215# endif
216# if !defined PRIu32 || 0
217# undef PRIu32
218# ifdef UINT32_MAX
219# define PRIu32 "u"
220# endif
221# endif
222# if !defined PRIx32 || 0
223# undef PRIx32
224# ifdef UINT32_MAX
225# define PRIx32 "x"
226# endif
227# endif
228# if !defined PRIX32 || 0
229# undef PRIX32
230# ifdef UINT32_MAX
231# define PRIX32 "X"
232# endif
233# endif
234# ifdef INT64_MAX
235# if (0 ? defined _LP64 : 1)
236# define _PRI64_PREFIX "l"
237# elif defined _MSC_VER || defined __MINGW32__
238# define _PRI64_PREFIX "I64"
239# elif 1 && LONG_MAX >> 30 == 1
240# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
241# endif
242# if !defined PRId64 || 0
243# undef PRId64
244# define PRId64 _PRI64_PREFIX "d"
245# endif
246# if !defined PRIi64 || 0
247# undef PRIi64
248# define PRIi64 _PRI64_PREFIX "i"
249# endif
250# endif
251# ifdef UINT64_MAX
252# if (0 ? defined _LP64 : 1)
253# define _PRIu64_PREFIX "l"
254# elif defined _MSC_VER || defined __MINGW32__
255# define _PRIu64_PREFIX "I64"
256# elif 1 && ULONG_MAX >> 31 == 1
257# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
258# endif
259# if !defined PRIo64 || 0
260# undef PRIo64
261# define PRIo64 _PRIu64_PREFIX "o"
262# endif
263# if !defined PRIu64 || 0
264# undef PRIu64
265# define PRIu64 _PRIu64_PREFIX "u"
266# endif
267# if !defined PRIx64 || 0
268# undef PRIx64
269# define PRIx64 _PRIu64_PREFIX "x"
270# endif
271# if !defined PRIX64 || 0
272# undef PRIX64
273# define PRIX64 _PRIu64_PREFIX "X"
274# endif
275# endif
276
277# if !defined PRIdLEAST8 || 0
278# undef PRIdLEAST8
279# define PRIdLEAST8 "d"
280# endif
281# if !defined PRIiLEAST8 || 0
282# undef PRIiLEAST8
283# define PRIiLEAST8 "i"
284# endif
285# if !defined PRIoLEAST8 || 0
286# undef PRIoLEAST8
287# define PRIoLEAST8 "o"
288# endif
289# if !defined PRIuLEAST8 || 0
290# undef PRIuLEAST8
291# define PRIuLEAST8 "u"
292# endif
293# if !defined PRIxLEAST8 || 0
294# undef PRIxLEAST8
295# define PRIxLEAST8 "x"
296# endif
297# if !defined PRIXLEAST8 || 0
298# undef PRIXLEAST8
299# define PRIXLEAST8 "X"
300# endif
301# if !defined PRIdLEAST16 || 0
302# undef PRIdLEAST16
303# define PRIdLEAST16 "d"
304# endif
305# if !defined PRIiLEAST16 || 0
306# undef PRIiLEAST16
307# define PRIiLEAST16 "i"
308# endif
309# if !defined PRIoLEAST16 || 0
310# undef PRIoLEAST16
311# define PRIoLEAST16 "o"
312# endif
313# if !defined PRIuLEAST16 || 0
314# undef PRIuLEAST16
315# define PRIuLEAST16 "u"
316# endif
317# if !defined PRIxLEAST16 || 0
318# undef PRIxLEAST16
319# define PRIxLEAST16 "x"
320# endif
321# if !defined PRIXLEAST16 || 0
322# undef PRIXLEAST16
323# define PRIXLEAST16 "X"
324# endif
325# if !defined PRIdLEAST32 || 0
326# undef PRIdLEAST32
327# define PRIdLEAST32 "d"
328# endif
329# if !defined PRIiLEAST32 || 0
330# undef PRIiLEAST32
331# define PRIiLEAST32 "i"
332# endif
333# if !defined PRIoLEAST32 || 0
334# undef PRIoLEAST32
335# define PRIoLEAST32 "o"
336# endif
337# if !defined PRIuLEAST32 || 0
338# undef PRIuLEAST32
339# define PRIuLEAST32 "u"
340# endif
341# if !defined PRIxLEAST32 || 0
342# undef PRIxLEAST32
343# define PRIxLEAST32 "x"
344# endif
345# if !defined PRIXLEAST32 || 0
346# undef PRIXLEAST32
347# define PRIXLEAST32 "X"
348# endif
349# ifdef INT64_MAX
350# if !defined PRIdLEAST64 || 0
351# undef PRIdLEAST64
352# define PRIdLEAST64 PRId64
353# endif
354# if !defined PRIiLEAST64 || 0
355# undef PRIiLEAST64
356# define PRIiLEAST64 PRIi64
357# endif
358# endif
359# ifdef UINT64_MAX
360# if !defined PRIoLEAST64 || 0
361# undef PRIoLEAST64
362# define PRIoLEAST64 PRIo64
363# endif
364# if !defined PRIuLEAST64 || 0
365# undef PRIuLEAST64
366# define PRIuLEAST64 PRIu64
367# endif
368# if !defined PRIxLEAST64 || 0
369# undef PRIxLEAST64
370# define PRIxLEAST64 PRIx64
371# endif
372# if !defined PRIXLEAST64 || 0
373# undef PRIXLEAST64
374# define PRIXLEAST64 PRIX64
375# endif
376# endif
377
378# if !defined PRIdFAST8 || 0
379# undef PRIdFAST8
380# if INT_FAST8_MAX > INT32_MAX
381# define PRIdFAST8 PRId64
382# else
383# define PRIdFAST8 "d"
384# endif
385# endif
386# if !defined PRIiFAST8 || 0
387# undef PRIiFAST8
388# if INT_FAST8_MAX > INT32_MAX
389# define PRIiFAST8 PRIi64
390# else
391# define PRIiFAST8 "i"
392# endif
393# endif
394# if !defined PRIoFAST8 || 0
395# undef PRIoFAST8
396# if UINT_FAST8_MAX > UINT32_MAX
397# define PRIoFAST8 PRIo64
398# else
399# define PRIoFAST8 "o"
400# endif
401# endif
402# if !defined PRIuFAST8 || 0
403# undef PRIuFAST8
404# if UINT_FAST8_MAX > UINT32_MAX
405# define PRIuFAST8 PRIu64
406# else
407# define PRIuFAST8 "u"
408# endif
409# endif
410# if !defined PRIxFAST8 || 0
411# undef PRIxFAST8
412# if UINT_FAST8_MAX > UINT32_MAX
413# define PRIxFAST8 PRIx64
414# else
415# define PRIxFAST8 "x"
416# endif
417# endif
418# if !defined PRIXFAST8 || 0
419# undef PRIXFAST8
420# if UINT_FAST8_MAX > UINT32_MAX
421# define PRIXFAST8 PRIX64
422# else
423# define PRIXFAST8 "X"
424# endif
425# endif
426# if !defined PRIdFAST16 || 0
427# undef PRIdFAST16
428# if INT_FAST16_MAX > INT32_MAX
429# define PRIdFAST16 PRId64
430# else
431# define PRIdFAST16 "d"
432# endif
433# endif
434# if !defined PRIiFAST16 || 0
435# undef PRIiFAST16
436# if INT_FAST16_MAX > INT32_MAX
437# define PRIiFAST16 PRIi64
438# else
439# define PRIiFAST16 "i"
440# endif
441# endif
442# if !defined PRIoFAST16 || 0
443# undef PRIoFAST16
444# if UINT_FAST16_MAX > UINT32_MAX
445# define PRIoFAST16 PRIo64
446# else
447# define PRIoFAST16 "o"
448# endif
449# endif
450# if !defined PRIuFAST16 || 0
451# undef PRIuFAST16
452# if UINT_FAST16_MAX > UINT32_MAX
453# define PRIuFAST16 PRIu64
454# else
455# define PRIuFAST16 "u"
456# endif
457# endif
458# if !defined PRIxFAST16 || 0
459# undef PRIxFAST16
460# if UINT_FAST16_MAX > UINT32_MAX
461# define PRIxFAST16 PRIx64
462# else
463# define PRIxFAST16 "x"
464# endif
465# endif
466# if !defined PRIXFAST16 || 0
467# undef PRIXFAST16
468# if UINT_FAST16_MAX > UINT32_MAX
469# define PRIXFAST16 PRIX64
470# else
471# define PRIXFAST16 "X"
472# endif
473# endif
474# if !defined PRIdFAST32 || 0
475# undef PRIdFAST32
476# if INT_FAST32_MAX > INT32_MAX
477# define PRIdFAST32 PRId64
478# else
479# define PRIdFAST32 "d"
480# endif
481# endif
482# if !defined PRIiFAST32 || 0
483# undef PRIiFAST32
484# if INT_FAST32_MAX > INT32_MAX
485# define PRIiFAST32 PRIi64
486# else
487# define PRIiFAST32 "i"
488# endif
489# endif
490# if !defined PRIoFAST32 || 0
491# undef PRIoFAST32
492# if UINT_FAST32_MAX > UINT32_MAX
493# define PRIoFAST32 PRIo64
494# else
495# define PRIoFAST32 "o"
496# endif
497# endif
498# if !defined PRIuFAST32 || 0
499# undef PRIuFAST32
500# if UINT_FAST32_MAX > UINT32_MAX
501# define PRIuFAST32 PRIu64
502# else
503# define PRIuFAST32 "u"
504# endif
505# endif
506# if !defined PRIxFAST32 || 0
507# undef PRIxFAST32
508# if UINT_FAST32_MAX > UINT32_MAX
509# define PRIxFAST32 PRIx64
510# else
511# define PRIxFAST32 "x"
512# endif
513# endif
514# if !defined PRIXFAST32 || 0
515# undef PRIXFAST32
516# if UINT_FAST32_MAX > UINT32_MAX
517# define PRIXFAST32 PRIX64
518# else
519# define PRIXFAST32 "X"
520# endif
521# endif
522# ifdef INT64_MAX
523# if !defined PRIdFAST64 || 0
524# undef PRIdFAST64
525# define PRIdFAST64 PRId64
526# endif
527# if !defined PRIiFAST64 || 0
528# undef PRIiFAST64
529# define PRIiFAST64 PRIi64
530# endif
531# endif
532# ifdef UINT64_MAX
533# if !defined PRIoFAST64 || 0
534# undef PRIoFAST64
535# define PRIoFAST64 PRIo64
536# endif
537# if !defined PRIuFAST64 || 0
538# undef PRIuFAST64
539# define PRIuFAST64 PRIu64
540# endif
541# if !defined PRIxFAST64 || 0
542# undef PRIxFAST64
543# define PRIxFAST64 PRIx64
544# endif
545# if !defined PRIXFAST64 || 0
546# undef PRIXFAST64
547# define PRIXFAST64 PRIX64
548# endif
549# endif
550
551# if !defined PRIdMAX || 0
552# undef PRIdMAX
553# if 1
554# define PRIdMAX PRId64
555# else
556# define PRIdMAX "ld"
557# endif
558# endif
559# if !defined PRIiMAX || 0
560# undef PRIiMAX
561# if 1
562# define PRIiMAX PRIi64
563# else
564# define PRIiMAX "li"
565# endif
566# endif
567# if !defined PRIoMAX || 0
568# undef PRIoMAX
569# if 1
570# define PRIoMAX PRIo64
571# else
572# define PRIoMAX "lo"
573# endif
574# endif
575# if !defined PRIuMAX || 0
576# undef PRIuMAX
577# if 1
578# define PRIuMAX PRIu64
579# else
580# define PRIuMAX "lu"
581# endif
582# endif
583# if !defined PRIxMAX || 0
584# undef PRIxMAX
585# if 1
586# define PRIxMAX PRIx64
587# else
588# define PRIxMAX "lx"
589# endif
590# endif
591# if !defined PRIXMAX || 0
592# undef PRIXMAX
593# if 1
594# define PRIXMAX PRIX64
595# else
596# define PRIXMAX "lX"
597# endif
598# endif
599
600# if !defined PRIdPTR || 0
601# undef PRIdPTR
602# ifdef INTPTR_MAX
603# define PRIdPTR "l" "d"
604# endif
605# endif
606# if !defined PRIiPTR || 0
607# undef PRIiPTR
608# ifdef INTPTR_MAX
609# define PRIiPTR "l" "i"
610# endif
611# endif
612# if !defined PRIoPTR || 0
613# undef PRIoPTR
614# ifdef UINTPTR_MAX
615# define PRIoPTR "l" "o"
616# endif
617# endif
618# if !defined PRIuPTR || 0
619# undef PRIuPTR
620# ifdef UINTPTR_MAX
621# define PRIuPTR "l" "u"
622# endif
623# endif
624# if !defined PRIxPTR || 0
625# undef PRIxPTR
626# ifdef UINTPTR_MAX
627# define PRIxPTR "l" "x"
628# endif
629# endif
630# if !defined PRIXPTR || 0
631# undef PRIXPTR
632# ifdef UINTPTR_MAX
633# define PRIXPTR "l" "X"
634# endif
635# endif
636
637# if !defined SCNd8 || 0
638# undef SCNd8
639# ifdef INT8_MAX
640# define SCNd8 "hhd"
641# endif
642# endif
643# if !defined SCNi8 || 0
644# undef SCNi8
645# ifdef INT8_MAX
646# define SCNi8 "hhi"
647# endif
648# endif
649# if !defined SCNo8 || 0
650# undef SCNo8
651# ifdef UINT8_MAX
652# define SCNo8 "hho"
653# endif
654# endif
655# if !defined SCNu8 || 0
656# undef SCNu8
657# ifdef UINT8_MAX
658# define SCNu8 "hhu"
659# endif
660# endif
661# if !defined SCNx8 || 0
662# undef SCNx8
663# ifdef UINT8_MAX
664# define SCNx8 "hhx"
665# endif
666# endif
667# if !defined SCNd16 || 0
668# undef SCNd16
669# ifdef INT16_MAX
670# define SCNd16 "hd"
671# endif
672# endif
673# if !defined SCNi16 || 0
674# undef SCNi16
675# ifdef INT16_MAX
676# define SCNi16 "hi"
677# endif
678# endif
679# if !defined SCNo16 || 0
680# undef SCNo16
681# ifdef UINT16_MAX
682# define SCNo16 "ho"
683# endif
684# endif
685# if !defined SCNu16 || 0
686# undef SCNu16
687# ifdef UINT16_MAX
688# define SCNu16 "hu"
689# endif
690# endif
691# if !defined SCNx16 || 0
692# undef SCNx16
693# ifdef UINT16_MAX
694# define SCNx16 "hx"
695# endif
696# endif
697# if !defined SCNd32 || 0
698# undef SCNd32
699# ifdef INT32_MAX
700# define SCNd32 "d"
701# endif
702# endif
703# if !defined SCNi32 || 0
704# undef SCNi32
705# ifdef INT32_MAX
706# define SCNi32 "i"
707# endif
708# endif
709# if !defined SCNo32 || 0
710# undef SCNo32
711# ifdef UINT32_MAX
712# define SCNo32 "o"
713# endif
714# endif
715# if !defined SCNu32 || 0
716# undef SCNu32
717# ifdef UINT32_MAX
718# define SCNu32 "u"
719# endif
720# endif
721# if !defined SCNx32 || 0
722# undef SCNx32
723# ifdef UINT32_MAX
724# define SCNx32 "x"
725# endif
726# endif
727# ifdef INT64_MAX
728# if (0 ? defined _LP64 : 1)
729# define _SCN64_PREFIX "l"
730# elif defined _MSC_VER || defined __MINGW32__
731# define _SCN64_PREFIX "I64"
732# elif 1 && LONG_MAX >> 30 == 1
733# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
734# endif
735# if !defined SCNd64 || 0
736# undef SCNd64
737# define SCNd64 _SCN64_PREFIX "d"
738# endif
739# if !defined SCNi64 || 0
740# undef SCNi64
741# define SCNi64 _SCN64_PREFIX "i"
742# endif
743# endif
744# ifdef UINT64_MAX
745# if (0 ? defined _LP64 : 1)
746# define _SCNu64_PREFIX "l"
747# elif defined _MSC_VER || defined __MINGW32__
748# define _SCNu64_PREFIX "I64"
749# elif 1 && ULONG_MAX >> 31 == 1
750# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
751# endif
752# if !defined SCNo64 || 0
753# undef SCNo64
754# define SCNo64 _SCNu64_PREFIX "o"
755# endif
756# if !defined SCNu64 || 0
757# undef SCNu64
758# define SCNu64 _SCNu64_PREFIX "u"
759# endif
760# if !defined SCNx64 || 0
761# undef SCNx64
762# define SCNx64 _SCNu64_PREFIX "x"
763# endif
764# endif
765
766# if !defined SCNdLEAST8 || 0
767# undef SCNdLEAST8
768# define SCNdLEAST8 "hhd"
769# endif
770# if !defined SCNiLEAST8 || 0
771# undef SCNiLEAST8
772# define SCNiLEAST8 "hhi"
773# endif
774# if !defined SCNoLEAST8 || 0
775# undef SCNoLEAST8
776# define SCNoLEAST8 "hho"
777# endif
778# if !defined SCNuLEAST8 || 0
779# undef SCNuLEAST8
780# define SCNuLEAST8 "hhu"
781# endif
782# if !defined SCNxLEAST8 || 0
783# undef SCNxLEAST8
784# define SCNxLEAST8 "hhx"
785# endif
786# if !defined SCNdLEAST16 || 0
787# undef SCNdLEAST16
788# define SCNdLEAST16 "hd"
789# endif
790# if !defined SCNiLEAST16 || 0
791# undef SCNiLEAST16
792# define SCNiLEAST16 "hi"
793# endif
794# if !defined SCNoLEAST16 || 0
795# undef SCNoLEAST16
796# define SCNoLEAST16 "ho"
797# endif
798# if !defined SCNuLEAST16 || 0
799# undef SCNuLEAST16
800# define SCNuLEAST16 "hu"
801# endif
802# if !defined SCNxLEAST16 || 0
803# undef SCNxLEAST16
804# define SCNxLEAST16 "hx"
805# endif
806# if !defined SCNdLEAST32 || 0
807# undef SCNdLEAST32
808# define SCNdLEAST32 "d"
809# endif
810# if !defined SCNiLEAST32 || 0
811# undef SCNiLEAST32
812# define SCNiLEAST32 "i"
813# endif
814# if !defined SCNoLEAST32 || 0
815# undef SCNoLEAST32
816# define SCNoLEAST32 "o"
817# endif
818# if !defined SCNuLEAST32 || 0
819# undef SCNuLEAST32
820# define SCNuLEAST32 "u"
821# endif
822# if !defined SCNxLEAST32 || 0
823# undef SCNxLEAST32
824# define SCNxLEAST32 "x"
825# endif
826# ifdef INT64_MAX
827# if !defined SCNdLEAST64 || 0
828# undef SCNdLEAST64
829# define SCNdLEAST64 SCNd64
830# endif
831# if !defined SCNiLEAST64 || 0
832# undef SCNiLEAST64
833# define SCNiLEAST64 SCNi64
834# endif
835# endif
836# ifdef UINT64_MAX
837# if !defined SCNoLEAST64 || 0
838# undef SCNoLEAST64
839# define SCNoLEAST64 SCNo64
840# endif
841# if !defined SCNuLEAST64 || 0
842# undef SCNuLEAST64
843# define SCNuLEAST64 SCNu64
844# endif
845# if !defined SCNxLEAST64 || 0
846# undef SCNxLEAST64
847# define SCNxLEAST64 SCNx64
848# endif
849# endif
850
851# if !defined SCNdFAST8 || 0
852# undef SCNdFAST8
853# if INT_FAST8_MAX > INT32_MAX
854# define SCNdFAST8 SCNd64
855# elif INT_FAST8_MAX == 0x7fff
856# define SCNdFAST8 "hd"
857# elif INT_FAST8_MAX == 0x7f
858# define SCNdFAST8 "hhd"
859# else
860# define SCNdFAST8 "d"
861# endif
862# endif
863# if !defined SCNiFAST8 || 0
864# undef SCNiFAST8
865# if INT_FAST8_MAX > INT32_MAX
866# define SCNiFAST8 SCNi64
867# elif INT_FAST8_MAX == 0x7fff
868# define SCNiFAST8 "hi"
869# elif INT_FAST8_MAX == 0x7f
870# define SCNiFAST8 "hhi"
871# else
872# define SCNiFAST8 "i"
873# endif
874# endif
875# if !defined SCNoFAST8 || 0
876# undef SCNoFAST8
877# if UINT_FAST8_MAX > UINT32_MAX
878# define SCNoFAST8 SCNo64
879# elif UINT_FAST8_MAX == 0xffff
880# define SCNoFAST8 "ho"
881# elif UINT_FAST8_MAX == 0xff
882# define SCNoFAST8 "hho"
883# else
884# define SCNoFAST8 "o"
885# endif
886# endif
887# if !defined SCNuFAST8 || 0
888# undef SCNuFAST8
889# if UINT_FAST8_MAX > UINT32_MAX
890# define SCNuFAST8 SCNu64
891# elif UINT_FAST8_MAX == 0xffff
892# define SCNuFAST8 "hu"
893# elif UINT_FAST8_MAX == 0xff
894# define SCNuFAST8 "hhu"
895# else
896# define SCNuFAST8 "u"
897# endif
898# endif
899# if !defined SCNxFAST8 || 0
900# undef SCNxFAST8
901# if UINT_FAST8_MAX > UINT32_MAX
902# define SCNxFAST8 SCNx64
903# elif UINT_FAST8_MAX == 0xffff
904# define SCNxFAST8 "hx"
905# elif UINT_FAST8_MAX == 0xff
906# define SCNxFAST8 "hhx"
907# else
908# define SCNxFAST8 "x"
909# endif
910# endif
911# if !defined SCNdFAST16 || 0
912# undef SCNdFAST16
913# if INT_FAST16_MAX > INT32_MAX
914# define SCNdFAST16 SCNd64
915# elif INT_FAST16_MAX == 0x7fff
916# define SCNdFAST16 "hd"
917# else
918# define SCNdFAST16 "d"
919# endif
920# endif
921# if !defined SCNiFAST16 || 0
922# undef SCNiFAST16
923# if INT_FAST16_MAX > INT32_MAX
924# define SCNiFAST16 SCNi64
925# elif INT_FAST16_MAX == 0x7fff
926# define SCNiFAST16 "hi"
927# else
928# define SCNiFAST16 "i"
929# endif
930# endif
931# if !defined SCNoFAST16 || 0
932# undef SCNoFAST16
933# if UINT_FAST16_MAX > UINT32_MAX
934# define SCNoFAST16 SCNo64
935# elif UINT_FAST16_MAX == 0xffff
936# define SCNoFAST16 "ho"
937# else
938# define SCNoFAST16 "o"
939# endif
940# endif
941# if !defined SCNuFAST16 || 0
942# undef SCNuFAST16
943# if UINT_FAST16_MAX > UINT32_MAX
944# define SCNuFAST16 SCNu64
945# elif UINT_FAST16_MAX == 0xffff
946# define SCNuFAST16 "hu"
947# else
948# define SCNuFAST16 "u"
949# endif
950# endif
951# if !defined SCNxFAST16 || 0
952# undef SCNxFAST16
953# if UINT_FAST16_MAX > UINT32_MAX
954# define SCNxFAST16 SCNx64
955# elif UINT_FAST16_MAX == 0xffff
956# define SCNxFAST16 "hx"
957# else
958# define SCNxFAST16 "x"
959# endif
960# endif
961# if !defined SCNdFAST32 || 0
962# undef SCNdFAST32
963# if INT_FAST32_MAX > INT32_MAX
964# define SCNdFAST32 SCNd64
965# else
966# define SCNdFAST32 "d"
967# endif
968# endif
969# if !defined SCNiFAST32 || 0
970# undef SCNiFAST32
971# if INT_FAST32_MAX > INT32_MAX
972# define SCNiFAST32 SCNi64
973# else
974# define SCNiFAST32 "i"
975# endif
976# endif
977# if !defined SCNoFAST32 || 0
978# undef SCNoFAST32
979# if UINT_FAST32_MAX > UINT32_MAX
980# define SCNoFAST32 SCNo64
981# else
982# define SCNoFAST32 "o"
983# endif
984# endif
985# if !defined SCNuFAST32 || 0
986# undef SCNuFAST32
987# if UINT_FAST32_MAX > UINT32_MAX
988# define SCNuFAST32 SCNu64
989# else
990# define SCNuFAST32 "u"
991# endif
992# endif
993# if !defined SCNxFAST32 || 0
994# undef SCNxFAST32
995# if UINT_FAST32_MAX > UINT32_MAX
996# define SCNxFAST32 SCNx64
997# else
998# define SCNxFAST32 "x"
999# endif
1000# endif
1001# ifdef INT64_MAX
1002# if !defined SCNdFAST64 || 0
1003# undef SCNdFAST64
1004# define SCNdFAST64 SCNd64
1005# endif
1006# if !defined SCNiFAST64 || 0
1007# undef SCNiFAST64
1008# define SCNiFAST64 SCNi64
1009# endif
1010# endif
1011# ifdef UINT64_MAX
1012# if !defined SCNoFAST64 || 0
1013# undef SCNoFAST64
1014# define SCNoFAST64 SCNo64
1015# endif
1016# if !defined SCNuFAST64 || 0
1017# undef SCNuFAST64
1018# define SCNuFAST64 SCNu64
1019# endif
1020# if !defined SCNxFAST64 || 0
1021# undef SCNxFAST64
1022# define SCNxFAST64 SCNx64
1023# endif
1024# endif
1025
1026# if !defined SCNdMAX || 0
1027# undef SCNdMAX
1028# if 1
1029# define SCNdMAX SCNd64
1030# else
1031# define SCNdMAX "ld"
1032# endif
1033# endif
1034# if !defined SCNiMAX || 0
1035# undef SCNiMAX
1036# if 1
1037# define SCNiMAX SCNi64
1038# else
1039# define SCNiMAX "li"
1040# endif
1041# endif
1042# if !defined SCNoMAX || 0
1043# undef SCNoMAX
1044# if 1
1045# define SCNoMAX SCNo64
1046# else
1047# define SCNoMAX "lo"
1048# endif
1049# endif
1050# if !defined SCNuMAX || 0
1051# undef SCNuMAX
1052# if 1
1053# define SCNuMAX SCNu64
1054# else
1055# define SCNuMAX "lu"
1056# endif
1057# endif
1058# if !defined SCNxMAX || 0
1059# undef SCNxMAX
1060# if 1
1061# define SCNxMAX SCNx64
1062# else
1063# define SCNxMAX "lx"
1064# endif
1065# endif
1066
1067# if !defined SCNdPTR || 0
1068# undef SCNdPTR
1069# ifdef INTPTR_MAX
1070# define SCNdPTR "l" "d"
1071# endif
1072# endif
1073# if !defined SCNiPTR || 0
1074# undef SCNiPTR
1075# ifdef INTPTR_MAX
1076# define SCNiPTR "l" "i"
1077# endif
1078# endif
1079# if !defined SCNoPTR || 0
1080# undef SCNoPTR
1081# ifdef UINTPTR_MAX
1082# define SCNoPTR "l" "o"
1083# endif
1084# endif
1085# if !defined SCNuPTR || 0
1086# undef SCNuPTR
1087# ifdef UINTPTR_MAX
1088# define SCNuPTR "l" "u"
1089# endif
1090# endif
1091# if !defined SCNxPTR || 0
1092# undef SCNxPTR
1093# ifdef UINTPTR_MAX
1094# define SCNxPTR "l" "x"
1095# endif
1096# endif
1097
1098#endif
1099
1100/* 7.8.2 Functions for greatest-width integer types */
1101
1102#ifdef __cplusplus
1103extern "C" {
1104#endif
1105
1106#if 0
1107# if !1
1108extern intmax_t imaxabs (intmax_t);
1109# endif
1110#elif defined GNULIB_POSIXCHECK
1111# undef imaxabs
1112# if HAVE_RAW_DECL_IMAXABS
1113_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
1114 "use gnulib module imaxabs for portability");
1115# endif
1116#endif
1117
1118#if 0
1119# if !1
1120# if !GNULIB_defined_imaxdiv_t
1121typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
1122# define GNULIB_defined_imaxdiv_t 1
1123# endif
1124extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
1125# endif
1126#elif defined GNULIB_POSIXCHECK
1127# undef imaxdiv
1128# if HAVE_RAW_DECL_IMAXDIV
1129_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
1130 "use gnulib module imaxdiv for portability");
1131# endif
1132#endif
1133
1134#if 1
1135# if !1
1136extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1137# endif
1138#elif defined GNULIB_POSIXCHECK
1139# undef strtoimax
1140# if HAVE_RAW_DECL_STRTOIMAX
1141_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
1142 "use gnulib module strtoimax for portability");
1143# endif
1144#endif
1145
1146#if 1
1147# if !1
1148extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
1149# endif
1150#elif defined GNULIB_POSIXCHECK
1151# undef strtoumax
1152# if HAVE_RAW_DECL_STRTOUMAX
1153_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
1154 "use gnulib module strtoumax for portability");
1155# endif
1156#endif
1157
1158/* Don't bother defining or declaring wcstoimax and wcstoumax, since
1159 wide-character functions like this are hardly ever useful. */
1160
1161#ifdef __cplusplus
1162}
1163#endif
1164
1165#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/lib/wchar.h b/lib/wchar.h
deleted file mode 100644
index b0949e1ea4e..00000000000
--- a/lib/wchar.h
+++ /dev/null
@@ -1,1306 +0,0 @@
1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
3
4 Copyright (C) 2007-2011 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19
20/* Written by Eric Blake. */
21
22/*
23 * ISO C 99 <wchar.h> for platforms that have issues.
24 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
25 *
26 * For now, this just ensures proper prerequisite inclusion order and
27 * the declaration of wcwidth().
28 */
29
30#if __GNUC__ >= 3
31#pragma GCC system_header
32#endif
33
34
35#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
36/* Special invocation convention:
37 - Inside glibc and uClibc header files.
38 - On HP-UX 11.00 we have a sequence of nested includes
39 <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
40 once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
41 and once directly. In both situations 'wint_t' is not yet defined,
42 therefore we cannot provide the function overrides; instead include only
43 the system's <wchar.h>.
44 - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
45 the latter includes <wchar.h>. But here, we have no way to detect whether
46 <wctype.h> is completely included or is still being included. */
47
48#include_next <wchar.h>
49
50#else
51/* Normal invocation convention. */
52
53#ifndef _GL_WCHAR_H
54
55#define _GL_ALREADY_INCLUDING_WCHAR_H
56
57#if 1
58# include <features.h> /* for __GLIBC__ */
59#endif
60
61/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
62 <wchar.h>.
63 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
64 included before <wchar.h>.
65 In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
66 by <stddef.h>.
67 But avoid namespace pollution on glibc systems. */
68#if !(defined __GLIBC__ && !defined __UCLIBC__)
69# include <stddef.h>
70#endif
71#ifndef __GLIBC__
72# include <stdio.h>
73# include <time.h>
74#endif
75
76/* Include the original <wchar.h> if it exists.
77 Some builds of uClibc lack it. */
78/* The include_next requires a split double-inclusion guard. */
79#if 1
80# include_next <wchar.h>
81#endif
82
83#undef _GL_ALREADY_INCLUDING_WCHAR_H
84
85#ifndef _GL_WCHAR_H
86#define _GL_WCHAR_H
87
88/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
89#ifndef _GL_CXXDEFS_H
90#define _GL_CXXDEFS_H
91
92/* The three most frequent use cases of these macros are:
93
94 * For providing a substitute for a function that is missing on some
95 platforms, but is declared and works fine on the platforms on which
96 it exists:
97
98 #if @GNULIB_FOO@
99 # if !@HAVE_FOO@
100 _GL_FUNCDECL_SYS (foo, ...);
101 # endif
102 _GL_CXXALIAS_SYS (foo, ...);
103 _GL_CXXALIASWARN (foo);
104 #elif defined GNULIB_POSIXCHECK
105 ...
106 #endif
107
108 * For providing a replacement for a function that exists on all platforms,
109 but is broken/insufficient and needs to be replaced on some platforms:
110
111 #if @GNULIB_FOO@
112 # if @REPLACE_FOO@
113 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
114 # undef foo
115 # define foo rpl_foo
116 # endif
117 _GL_FUNCDECL_RPL (foo, ...);
118 _GL_CXXALIAS_RPL (foo, ...);
119 # else
120 _GL_CXXALIAS_SYS (foo, ...);
121 # endif
122 _GL_CXXALIASWARN (foo);
123 #elif defined GNULIB_POSIXCHECK
124 ...
125 #endif
126
127 * For providing a replacement for a function that exists on some platforms
128 but is broken/insufficient and needs to be replaced on some of them and
129 is additionally either missing or undeclared on some other platforms:
130
131 #if @GNULIB_FOO@
132 # if @REPLACE_FOO@
133 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
134 # undef foo
135 # define foo rpl_foo
136 # endif
137 _GL_FUNCDECL_RPL (foo, ...);
138 _GL_CXXALIAS_RPL (foo, ...);
139 # else
140 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
141 _GL_FUNCDECL_SYS (foo, ...);
142 # endif
143 _GL_CXXALIAS_SYS (foo, ...);
144 # endif
145 _GL_CXXALIASWARN (foo);
146 #elif defined GNULIB_POSIXCHECK
147 ...
148 #endif
149*/
150
151/* _GL_EXTERN_C declaration;
152 performs the declaration with C linkage. */
153#if defined __cplusplus
154# define _GL_EXTERN_C extern "C"
155#else
156# define _GL_EXTERN_C extern
157#endif
158
159/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
160 declares a replacement function, named rpl_func, with the given prototype,
161 consisting of return type, parameters, and attributes.
162 Example:
163 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
164 _GL_ARG_NONNULL ((1)));
165 */
166#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
167 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
168#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
169 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
170
171/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
172 declares the system function, named func, with the given prototype,
173 consisting of return type, parameters, and attributes.
174 Example:
175 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
176 _GL_ARG_NONNULL ((1)));
177 */
178#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
179 _GL_EXTERN_C rettype func parameters_and_attributes
180
181/* _GL_CXXALIAS_RPL (func, rettype, parameters);
182 declares a C++ alias called GNULIB_NAMESPACE::func
183 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
184 Example:
185 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
186 */
187#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
188 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
189#if defined __cplusplus && defined GNULIB_NAMESPACE
190# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
191 namespace GNULIB_NAMESPACE \
192 { \
193 rettype (*const func) parameters = ::rpl_func; \
194 } \
195 _GL_EXTERN_C int _gl_cxxalias_dummy
196#else
197# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
198 _GL_EXTERN_C int _gl_cxxalias_dummy
199#endif
200
201/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
202 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
203 except that the C function rpl_func may have a slightly different
204 declaration. A cast is used to silence the "invalid conversion" error
205 that would otherwise occur. */
206#if defined __cplusplus && defined GNULIB_NAMESPACE
207# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
208 namespace GNULIB_NAMESPACE \
209 { \
210 rettype (*const func) parameters = \
211 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
212 } \
213 _GL_EXTERN_C int _gl_cxxalias_dummy
214#else
215# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
216 _GL_EXTERN_C int _gl_cxxalias_dummy
217#endif
218
219/* _GL_CXXALIAS_SYS (func, rettype, parameters);
220 declares a C++ alias called GNULIB_NAMESPACE::func
221 that redirects to the system provided function func, if GNULIB_NAMESPACE
222 is defined.
223 Example:
224 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
225 */
226#if defined __cplusplus && defined GNULIB_NAMESPACE
227 /* If we were to write
228 rettype (*const func) parameters = ::func;
229 like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
230 better (remove an indirection through a 'static' pointer variable),
231 but then the _GL_CXXALIASWARN macro below would cause a warning not only
232 for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
233# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
234 namespace GNULIB_NAMESPACE \
235 { \
236 static rettype (*func) parameters = ::func; \
237 } \
238 _GL_EXTERN_C int _gl_cxxalias_dummy
239#else
240# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
241 _GL_EXTERN_C int _gl_cxxalias_dummy
242#endif
243
244/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
245 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
246 except that the C function func may have a slightly different declaration.
247 A cast is used to silence the "invalid conversion" error that would
248 otherwise occur. */
249#if defined __cplusplus && defined GNULIB_NAMESPACE
250# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
251 namespace GNULIB_NAMESPACE \
252 { \
253 static rettype (*func) parameters = \
254 reinterpret_cast<rettype(*)parameters>(::func); \
255 } \
256 _GL_EXTERN_C int _gl_cxxalias_dummy
257#else
258# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
259 _GL_EXTERN_C int _gl_cxxalias_dummy
260#endif
261
262/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
263 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
264 except that the C function is picked among a set of overloaded functions,
265 namely the one with rettype2 and parameters2. Two consecutive casts
266 are used to silence the "cannot find a match" and "invalid conversion"
267 errors that would otherwise occur. */
268#if defined __cplusplus && defined GNULIB_NAMESPACE
269 /* The outer cast must be a reinterpret_cast.
270 The inner cast: When the function is defined as a set of overloaded
271 functions, it works as a static_cast<>, choosing the designated variant.
272 When the function is defined as a single variant, it works as a
273 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
274# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
275 namespace GNULIB_NAMESPACE \
276 { \
277 static rettype (*func) parameters = \
278 reinterpret_cast<rettype(*)parameters>( \
279 (rettype2(*)parameters2)(::func)); \
280 } \
281 _GL_EXTERN_C int _gl_cxxalias_dummy
282#else
283# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
284 _GL_EXTERN_C int _gl_cxxalias_dummy
285#endif
286
287/* _GL_CXXALIASWARN (func);
288 causes a warning to be emitted when ::func is used but not when
289 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
290 variants. */
291#if defined __cplusplus && defined GNULIB_NAMESPACE
292# define _GL_CXXALIASWARN(func) \
293 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
294# define _GL_CXXALIASWARN_1(func,namespace) \
295 _GL_CXXALIASWARN_2 (func, namespace)
296/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
297 we enable the warning only when not optimizing. */
298# if !__OPTIMIZE__
299# define _GL_CXXALIASWARN_2(func,namespace) \
300 _GL_WARN_ON_USE (func, \
301 "The symbol ::" #func " refers to the system function. " \
302 "Use " #namespace "::" #func " instead.")
303# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304# define _GL_CXXALIASWARN_2(func,namespace) \
305 extern __typeof__ (func) func
306# else
307# define _GL_CXXALIASWARN_2(func,namespace) \
308 _GL_EXTERN_C int _gl_cxxalias_dummy
309# endif
310#else
311# define _GL_CXXALIASWARN(func) \
312 _GL_EXTERN_C int _gl_cxxalias_dummy
313#endif
314
315/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
316 causes a warning to be emitted when the given overloaded variant of ::func
317 is used but not when GNULIB_NAMESPACE::func is used. */
318#if defined __cplusplus && defined GNULIB_NAMESPACE
319# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
320 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
321 GNULIB_NAMESPACE)
322# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
323 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
324/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
325 we enable the warning only when not optimizing. */
326# if !__OPTIMIZE__
327# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
328 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
329 "The symbol ::" #func " refers to the system function. " \
330 "Use " #namespace "::" #func " instead.")
331# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
332# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
333 extern __typeof__ (func) func
334# else
335# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
336 _GL_EXTERN_C int _gl_cxxalias_dummy
337# endif
338#else
339# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
340 _GL_EXTERN_C int _gl_cxxalias_dummy
341#endif
342
343#endif /* _GL_CXXDEFS_H */
344
345/* The definition of _GL_ARG_NONNULL is copied here. */
346/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
347 that the values passed as arguments n, ..., m must be non-NULL pointers.
348 n = 1 stands for the first argument, n = 2 for the second argument etc. */
349#ifndef _GL_ARG_NONNULL
350# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
351# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
352# else
353# define _GL_ARG_NONNULL(params)
354# endif
355#endif
356
357/* The definition of _GL_WARN_ON_USE is copied here. */
358#ifndef _GL_WARN_ON_USE
359
360# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
361/* A compiler attribute is available in gcc versions 4.3.0 and later. */
362# define _GL_WARN_ON_USE(function, message) \
363extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
364# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
365/* Verify the existence of the function. */
366# define _GL_WARN_ON_USE(function, message) \
367extern __typeof__ (function) function
368# else /* Unsupported. */
369# define _GL_WARN_ON_USE(function, message) \
370_GL_WARN_EXTERN_C int _gl_warn_on_use
371# endif
372#endif
373
374/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
375 is like _GL_WARN_ON_USE (function, "string"), except that the function is
376 declared with the given prototype, consisting of return type, parameters,
377 and attributes.
378 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
379 not work in this case. */
380#ifndef _GL_WARN_ON_USE_CXX
381# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
382# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
383extern rettype function parameters_and_attributes \
384 __attribute__ ((__warning__ (msg)))
385# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
386/* Verify the existence of the function. */
387# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
388extern rettype function parameters_and_attributes
389# else /* Unsupported. */
390# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
391_GL_WARN_EXTERN_C int _gl_warn_on_use
392# endif
393#endif
394
395/* _GL_WARN_EXTERN_C declaration;
396 performs the declaration with C linkage. */
397#ifndef _GL_WARN_EXTERN_C
398# if defined __cplusplus
399# define _GL_WARN_EXTERN_C extern "C"
400# else
401# define _GL_WARN_EXTERN_C extern
402# endif
403#endif
404
405
406/* Define wint_t and WEOF. (Also done in wctype.in.h.) */
407#if !1 && !defined wint_t
408# define wint_t int
409# ifndef WEOF
410# define WEOF -1
411# endif
412#else
413# ifndef WEOF
414# define WEOF ((wint_t) -1)
415# endif
416#endif
417
418
419/* Override mbstate_t if it is too small.
420 On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
421 implementing mbrtowc for encodings like UTF-8. */
422#if !(1 && 1) || 0
423# if !GNULIB_defined_mbstate_t
424typedef int rpl_mbstate_t;
425# undef mbstate_t
426# define mbstate_t rpl_mbstate_t
427# define GNULIB_defined_mbstate_t 1
428# endif
429#endif
430
431
432/* Convert a single-byte character to a wide character. */
433#if 0
434# if 0
435# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
436# undef btowc
437# define btowc rpl_btowc
438# endif
439_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
440_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
441# else
442# if !1
443_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
444# endif
445_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
446# endif
447_GL_CXXALIASWARN (btowc);
448#elif defined GNULIB_POSIXCHECK
449# undef btowc
450# if HAVE_RAW_DECL_BTOWC
451_GL_WARN_ON_USE (btowc, "btowc is unportable - "
452 "use gnulib module btowc for portability");
453# endif
454#endif
455
456
457/* Convert a wide character to a single-byte character. */
458#if 0
459# if 0
460# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
461# undef wctob
462# define wctob rpl_wctob
463# endif
464_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
465_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
466# else
467# if !defined wctob && !1
468/* wctob is provided by gnulib, or wctob exists but is not declared. */
469_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
470# endif
471_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
472# endif
473_GL_CXXALIASWARN (wctob);
474#elif defined GNULIB_POSIXCHECK
475# undef wctob
476# if HAVE_RAW_DECL_WCTOB
477_GL_WARN_ON_USE (wctob, "wctob is unportable - "
478 "use gnulib module wctob for portability");
479# endif
480#endif
481
482
483/* Test whether *PS is in the initial state. */
484#if 0
485# if 0
486# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
487# undef mbsinit
488# define mbsinit rpl_mbsinit
489# endif
490_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
491_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
492# else
493# if !1
494_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
495# endif
496_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
497# endif
498_GL_CXXALIASWARN (mbsinit);
499#elif defined GNULIB_POSIXCHECK
500# undef mbsinit
501# if HAVE_RAW_DECL_MBSINIT
502_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
503 "use gnulib module mbsinit for portability");
504# endif
505#endif
506
507
508/* Convert a multibyte character to a wide character. */
509#if 0
510# if 0
511# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
512# undef mbrtowc
513# define mbrtowc rpl_mbrtowc
514# endif
515_GL_FUNCDECL_RPL (mbrtowc, size_t,
516 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
517_GL_CXXALIAS_RPL (mbrtowc, size_t,
518 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
519# else
520# if !1
521_GL_FUNCDECL_SYS (mbrtowc, size_t,
522 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
523# endif
524_GL_CXXALIAS_SYS (mbrtowc, size_t,
525 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
526# endif
527_GL_CXXALIASWARN (mbrtowc);
528#elif defined GNULIB_POSIXCHECK
529# undef mbrtowc
530# if HAVE_RAW_DECL_MBRTOWC
531_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
532 "use gnulib module mbrtowc for portability");
533# endif
534#endif
535
536
537/* Recognize a multibyte character. */
538#if 0
539# if 0
540# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
541# undef mbrlen
542# define mbrlen rpl_mbrlen
543# endif
544_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
545_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
546# else
547# if !1
548_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
549# endif
550_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
551# endif
552_GL_CXXALIASWARN (mbrlen);
553#elif defined GNULIB_POSIXCHECK
554# undef mbrlen
555# if HAVE_RAW_DECL_MBRLEN
556_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
557 "use gnulib module mbrlen for portability");
558# endif
559#endif
560
561
562/* Convert a string to a wide string. */
563#if 0
564# if 0
565# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
566# undef mbsrtowcs
567# define mbsrtowcs rpl_mbsrtowcs
568# endif
569_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
570 (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
571 _GL_ARG_NONNULL ((2)));
572_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
573 (wchar_t *dest, const char **srcp, size_t len,
574 mbstate_t *ps));
575# else
576# if !1
577_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
578 (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
579 _GL_ARG_NONNULL ((2)));
580# endif
581_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
582 (wchar_t *dest, const char **srcp, size_t len,
583 mbstate_t *ps));
584# endif
585_GL_CXXALIASWARN (mbsrtowcs);
586#elif defined GNULIB_POSIXCHECK
587# undef mbsrtowcs
588# if HAVE_RAW_DECL_MBSRTOWCS
589_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
590 "use gnulib module mbsrtowcs for portability");
591# endif
592#endif
593
594
595/* Convert a string to a wide string. */
596#if 0
597# if 0
598# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
599# undef mbsnrtowcs
600# define mbsnrtowcs rpl_mbsnrtowcs
601# endif
602_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
603 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
604 mbstate_t *ps)
605 _GL_ARG_NONNULL ((2)));
606_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
607 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
608 mbstate_t *ps));
609# else
610# if !1
611_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
612 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
613 mbstate_t *ps)
614 _GL_ARG_NONNULL ((2)));
615# endif
616_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
617 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
618 mbstate_t *ps));
619# endif
620_GL_CXXALIASWARN (mbsnrtowcs);
621#elif defined GNULIB_POSIXCHECK
622# undef mbsnrtowcs
623# if HAVE_RAW_DECL_MBSNRTOWCS
624_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
625 "use gnulib module mbsnrtowcs for portability");
626# endif
627#endif
628
629
630/* Convert a wide character to a multibyte character. */
631#if 0
632# if 0
633# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
634# undef wcrtomb
635# define wcrtomb rpl_wcrtomb
636# endif
637_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
638_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
639# else
640# if !1
641_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
642# endif
643_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
644# endif
645_GL_CXXALIASWARN (wcrtomb);
646#elif defined GNULIB_POSIXCHECK
647# undef wcrtomb
648# if HAVE_RAW_DECL_WCRTOMB
649_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
650 "use gnulib module wcrtomb for portability");
651# endif
652#endif
653
654
655/* Convert a wide string to a string. */
656#if 0
657# if 0
658# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
659# undef wcsrtombs
660# define wcsrtombs rpl_wcsrtombs
661# endif
662_GL_FUNCDECL_RPL (wcsrtombs, size_t,
663 (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
664 _GL_ARG_NONNULL ((2)));
665_GL_CXXALIAS_RPL (wcsrtombs, size_t,
666 (char *dest, const wchar_t **srcp, size_t len,
667 mbstate_t *ps));
668# else
669# if !1
670_GL_FUNCDECL_SYS (wcsrtombs, size_t,
671 (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
672 _GL_ARG_NONNULL ((2)));
673# endif
674_GL_CXXALIAS_SYS (wcsrtombs, size_t,
675 (char *dest, const wchar_t **srcp, size_t len,
676 mbstate_t *ps));
677# endif
678_GL_CXXALIASWARN (wcsrtombs);
679#elif defined GNULIB_POSIXCHECK
680# undef wcsrtombs
681# if HAVE_RAW_DECL_WCSRTOMBS
682_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
683 "use gnulib module wcsrtombs for portability");
684# endif
685#endif
686
687
688/* Convert a wide string to a string. */
689#if 0
690# if 0
691# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
692# undef wcsnrtombs
693# define wcsnrtombs rpl_wcsnrtombs
694# endif
695_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
696 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
697 mbstate_t *ps)
698 _GL_ARG_NONNULL ((2)));
699_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
700 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
701 mbstate_t *ps));
702# else
703# if !1
704_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
705 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
706 mbstate_t *ps)
707 _GL_ARG_NONNULL ((2)));
708# endif
709_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
710 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
711 mbstate_t *ps));
712# endif
713_GL_CXXALIASWARN (wcsnrtombs);
714#elif defined GNULIB_POSIXCHECK
715# undef wcsnrtombs
716# if HAVE_RAW_DECL_WCSNRTOMBS
717_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
718 "use gnulib module wcsnrtombs for portability");
719# endif
720#endif
721
722
723/* Return the number of screen columns needed for WC. */
724#if 0
725# if 0
726# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
727# undef wcwidth
728# define wcwidth rpl_wcwidth
729# endif
730_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
731_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
732# else
733# if !1
734/* wcwidth exists but is not declared. */
735_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
736# endif
737_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
738# endif
739_GL_CXXALIASWARN (wcwidth);
740#elif defined GNULIB_POSIXCHECK
741# undef wcwidth
742# if HAVE_RAW_DECL_WCWIDTH
743_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
744 "use gnulib module wcwidth for portability");
745# endif
746#endif
747
748
749/* Search N wide characters of S for C. */
750#if 0
751# if !1
752_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n));
753# endif
754 /* On some systems, this function is defined as an overloaded function:
755 extern "C++" {
756 const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
757 wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
758 } */
759_GL_CXXALIAS_SYS_CAST2 (wmemchr,
760 wchar_t *, (const wchar_t *, wchar_t, size_t),
761 const wchar_t *, (const wchar_t *, wchar_t, size_t));
762# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
763 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
764_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
765_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
766 (const wchar_t *s, wchar_t c, size_t n));
767# else
768_GL_CXXALIASWARN (wmemchr);
769# endif
770#elif defined GNULIB_POSIXCHECK
771# undef wmemchr
772# if HAVE_RAW_DECL_WMEMCHR
773_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
774 "use gnulib module wmemchr for portability");
775# endif
776#endif
777
778
779/* Compare N wide characters of S1 and S2. */
780#if 0
781# if !1
782_GL_FUNCDECL_SYS (wmemcmp, int,
783 (const wchar_t *s1, const wchar_t *s2, size_t n));
784# endif
785_GL_CXXALIAS_SYS (wmemcmp, int,
786 (const wchar_t *s1, const wchar_t *s2, size_t n));
787_GL_CXXALIASWARN (wmemcmp);
788#elif defined GNULIB_POSIXCHECK
789# undef wmemcmp
790# if HAVE_RAW_DECL_WMEMCMP
791_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
792 "use gnulib module wmemcmp for portability");
793# endif
794#endif
795
796
797/* Copy N wide characters of SRC to DEST. */
798#if 0
799# if !1
800_GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
801 (wchar_t *dest, const wchar_t *src, size_t n));
802# endif
803_GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
804 (wchar_t *dest, const wchar_t *src, size_t n));
805_GL_CXXALIASWARN (wmemcpy);
806#elif defined GNULIB_POSIXCHECK
807# undef wmemcpy
808# if HAVE_RAW_DECL_WMEMCPY
809_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
810 "use gnulib module wmemcpy for portability");
811# endif
812#endif
813
814
815/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
816 overlapping memory areas. */
817#if 0
818# if !1
819_GL_FUNCDECL_SYS (wmemmove, wchar_t *,
820 (wchar_t *dest, const wchar_t *src, size_t n));
821# endif
822_GL_CXXALIAS_SYS (wmemmove, wchar_t *,
823 (wchar_t *dest, const wchar_t *src, size_t n));
824_GL_CXXALIASWARN (wmemmove);
825#elif defined GNULIB_POSIXCHECK
826# undef wmemmove
827# if HAVE_RAW_DECL_WMEMMOVE
828_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
829 "use gnulib module wmemmove for portability");
830# endif
831#endif
832
833
834/* Set N wide characters of S to C. */
835#if 0
836# if !1
837_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
838# endif
839_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
840_GL_CXXALIASWARN (wmemset);
841#elif defined GNULIB_POSIXCHECK
842# undef wmemset
843# if HAVE_RAW_DECL_WMEMSET
844_GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
845 "use gnulib module wmemset for portability");
846# endif
847#endif
848
849
850/* Return the number of wide characters in S. */
851#if 0
852# if !1
853_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s));
854# endif
855_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
856_GL_CXXALIASWARN (wcslen);
857#elif defined GNULIB_POSIXCHECK
858# undef wcslen
859# if HAVE_RAW_DECL_WCSLEN
860_GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
861 "use gnulib module wcslen for portability");
862# endif
863#endif
864
865
866/* Return the number of wide characters in S, but at most MAXLEN. */
867#if 0
868# if !1
869_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
870# endif
871_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
872_GL_CXXALIASWARN (wcsnlen);
873#elif defined GNULIB_POSIXCHECK
874# undef wcsnlen
875# if HAVE_RAW_DECL_WCSNLEN
876_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
877 "use gnulib module wcsnlen for portability");
878# endif
879#endif
880
881
882/* Copy SRC to DEST. */
883#if 0
884# if !1
885_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
886# endif
887_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
888_GL_CXXALIASWARN (wcscpy);
889#elif defined GNULIB_POSIXCHECK
890# undef wcscpy
891# if HAVE_RAW_DECL_WCSCPY
892_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
893 "use gnulib module wcscpy for portability");
894# endif
895#endif
896
897
898/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
899#if 0
900# if !1
901_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
902# endif
903_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
904_GL_CXXALIASWARN (wcpcpy);
905#elif defined GNULIB_POSIXCHECK
906# undef wcpcpy
907# if HAVE_RAW_DECL_WCPCPY
908_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
909 "use gnulib module wcpcpy for portability");
910# endif
911#endif
912
913
914/* Copy no more than N wide characters of SRC to DEST. */
915#if 0
916# if !1
917_GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
918 (wchar_t *dest, const wchar_t *src, size_t n));
919# endif
920_GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
921 (wchar_t *dest, const wchar_t *src, size_t n));
922_GL_CXXALIASWARN (wcsncpy);
923#elif defined GNULIB_POSIXCHECK
924# undef wcsncpy
925# if HAVE_RAW_DECL_WCSNCPY
926_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
927 "use gnulib module wcsncpy for portability");
928# endif
929#endif
930
931
932/* Copy no more than N characters of SRC to DEST, returning the address of
933 the last character written into DEST. */
934#if 0
935# if !1
936_GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
937 (wchar_t *dest, const wchar_t *src, size_t n));
938# endif
939_GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
940 (wchar_t *dest, const wchar_t *src, size_t n));
941_GL_CXXALIASWARN (wcpncpy);
942#elif defined GNULIB_POSIXCHECK
943# undef wcpncpy
944# if HAVE_RAW_DECL_WCPNCPY
945_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
946 "use gnulib module wcpncpy for portability");
947# endif
948#endif
949
950
951/* Append SRC onto DEST. */
952#if 0
953# if !1
954_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
955# endif
956_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
957_GL_CXXALIASWARN (wcscat);
958#elif defined GNULIB_POSIXCHECK
959# undef wcscat
960# if HAVE_RAW_DECL_WCSCAT
961_GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
962 "use gnulib module wcscat for portability");
963# endif
964#endif
965
966
967/* Append no more than N wide characters of SRC onto DEST. */
968#if 0
969# if !1
970_GL_FUNCDECL_SYS (wcsncat, wchar_t *,
971 (wchar_t *dest, const wchar_t *src, size_t n));
972# endif
973_GL_CXXALIAS_SYS (wcsncat, wchar_t *,
974 (wchar_t *dest, const wchar_t *src, size_t n));
975_GL_CXXALIASWARN (wcsncat);
976#elif defined GNULIB_POSIXCHECK
977# undef wcsncat
978# if HAVE_RAW_DECL_WCSNCAT
979_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
980 "use gnulib module wcsncat for portability");
981# endif
982#endif
983
984
985/* Compare S1 and S2. */
986#if 0
987# if !1
988_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
989# endif
990_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
991_GL_CXXALIASWARN (wcscmp);
992#elif defined GNULIB_POSIXCHECK
993# undef wcscmp
994# if HAVE_RAW_DECL_WCSCMP
995_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
996 "use gnulib module wcscmp for portability");
997# endif
998#endif
999
1000
1001/* Compare no more than N wide characters of S1 and S2. */
1002#if 0
1003# if !1
1004_GL_FUNCDECL_SYS (wcsncmp, int,
1005 (const wchar_t *s1, const wchar_t *s2, size_t n));
1006# endif
1007_GL_CXXALIAS_SYS (wcsncmp, int,
1008 (const wchar_t *s1, const wchar_t *s2, size_t n));
1009_GL_CXXALIASWARN (wcsncmp);
1010#elif defined GNULIB_POSIXCHECK
1011# undef wcsncmp
1012# if HAVE_RAW_DECL_WCSNCMP
1013_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
1014 "use gnulib module wcsncmp for portability");
1015# endif
1016#endif
1017
1018
1019/* Compare S1 and S2, ignoring case. */
1020#if 0
1021# if !1
1022_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
1023# endif
1024_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
1025_GL_CXXALIASWARN (wcscasecmp);
1026#elif defined GNULIB_POSIXCHECK
1027# undef wcscasecmp
1028# if HAVE_RAW_DECL_WCSCASECMP
1029_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
1030 "use gnulib module wcscasecmp for portability");
1031# endif
1032#endif
1033
1034
1035/* Compare no more than N chars of S1 and S2, ignoring case. */
1036#if 0
1037# if !1
1038_GL_FUNCDECL_SYS (wcsncasecmp, int,
1039 (const wchar_t *s1, const wchar_t *s2, size_t n));
1040# endif
1041_GL_CXXALIAS_SYS (wcsncasecmp, int,
1042 (const wchar_t *s1, const wchar_t *s2, size_t n));
1043_GL_CXXALIASWARN (wcsncasecmp);
1044#elif defined GNULIB_POSIXCHECK
1045# undef wcsncasecmp
1046# if HAVE_RAW_DECL_WCSNCASECMP
1047_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
1048 "use gnulib module wcsncasecmp for portability");
1049# endif
1050#endif
1051
1052
1053/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
1054 category of the current locale. */
1055#if 0
1056# if !1
1057_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1058# endif
1059_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1060_GL_CXXALIASWARN (wcscoll);
1061#elif defined GNULIB_POSIXCHECK
1062# undef wcscoll
1063# if HAVE_RAW_DECL_WCSCOLL
1064_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
1065 "use gnulib module wcscoll for portability");
1066# endif
1067#endif
1068
1069
1070/* Transform S2 into array pointed to by S1 such that if wcscmp is applied
1071 to two transformed strings the result is the as applying 'wcscoll' to the
1072 original strings. */
1073#if 0
1074# if !1
1075_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1076# endif
1077_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1078_GL_CXXALIASWARN (wcsxfrm);
1079#elif defined GNULIB_POSIXCHECK
1080# undef wcsxfrm
1081# if HAVE_RAW_DECL_WCSXFRM
1082_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
1083 "use gnulib module wcsxfrm for portability");
1084# endif
1085#endif
1086
1087
1088/* Duplicate S, returning an identical malloc'd string. */
1089#if 0
1090# if !1
1091_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1092# endif
1093_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1094_GL_CXXALIASWARN (wcsdup);
1095#elif defined GNULIB_POSIXCHECK
1096# undef wcsdup
1097# if HAVE_RAW_DECL_WCSDUP
1098_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
1099 "use gnulib module wcsdup for portability");
1100# endif
1101#endif
1102
1103
1104/* Find the first occurrence of WC in WCS. */
1105#if 0
1106# if !1
1107_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
1108# endif
1109 /* On some systems, this function is defined as an overloaded function:
1110 extern "C++" {
1111 const wchar_t * std::wcschr (const wchar_t *, wchar_t);
1112 wchar_t * std::wcschr (wchar_t *, wchar_t);
1113 } */
1114_GL_CXXALIAS_SYS_CAST2 (wcschr,
1115 wchar_t *, (const wchar_t *, wchar_t),
1116 const wchar_t *, (const wchar_t *, wchar_t));
1117# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1118 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1119_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1120_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1121# else
1122_GL_CXXALIASWARN (wcschr);
1123# endif
1124#elif defined GNULIB_POSIXCHECK
1125# undef wcschr
1126# if HAVE_RAW_DECL_WCSCHR
1127_GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
1128 "use gnulib module wcschr for portability");
1129# endif
1130#endif
1131
1132
1133/* Find the last occurrence of WC in WCS. */
1134#if 0
1135# if !1
1136_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
1137# endif
1138 /* On some systems, this function is defined as an overloaded function:
1139 extern "C++" {
1140 const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
1141 wchar_t * std::wcsrchr (wchar_t *, wchar_t);
1142 } */
1143_GL_CXXALIAS_SYS_CAST2 (wcsrchr,
1144 wchar_t *, (const wchar_t *, wchar_t),
1145 const wchar_t *, (const wchar_t *, wchar_t));
1146# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1147 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1148_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1149_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1150# else
1151_GL_CXXALIASWARN (wcsrchr);
1152# endif
1153#elif defined GNULIB_POSIXCHECK
1154# undef wcsrchr
1155# if HAVE_RAW_DECL_WCSRCHR
1156_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
1157 "use gnulib module wcsrchr for portability");
1158# endif
1159#endif
1160
1161
1162/* Return the length of the initial segmet of WCS which consists entirely
1163 of wide characters not in REJECT. */
1164#if 0
1165# if !1
1166_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
1167# endif
1168_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
1169_GL_CXXALIASWARN (wcscspn);
1170#elif defined GNULIB_POSIXCHECK
1171# undef wcscspn
1172# if HAVE_RAW_DECL_WCSCSPN
1173_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
1174 "use gnulib module wcscspn for portability");
1175# endif
1176#endif
1177
1178
1179/* Return the length of the initial segmet of WCS which consists entirely
1180 of wide characters in ACCEPT. */
1181#if 0
1182# if !1
1183_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
1184# endif
1185_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
1186_GL_CXXALIASWARN (wcsspn);
1187#elif defined GNULIB_POSIXCHECK
1188# undef wcsspn
1189# if HAVE_RAW_DECL_WCSSPN
1190_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
1191 "use gnulib module wcsspn for portability");
1192# endif
1193#endif
1194
1195
1196/* Find the first occurrence in WCS of any character in ACCEPT. */
1197#if 0
1198# if !1
1199_GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
1200 (const wchar_t *wcs, const wchar_t *accept));
1201# endif
1202 /* On some systems, this function is defined as an overloaded function:
1203 extern "C++" {
1204 const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
1205 wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
1206 } */
1207_GL_CXXALIAS_SYS_CAST2 (wcspbrk,
1208 wchar_t *, (const wchar_t *, const wchar_t *),
1209 const wchar_t *, (const wchar_t *, const wchar_t *));
1210# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1211 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1212_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
1213 (wchar_t *wcs, const wchar_t *accept));
1214_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
1215 (const wchar_t *wcs, const wchar_t *accept));
1216# else
1217_GL_CXXALIASWARN (wcspbrk);
1218# endif
1219#elif defined GNULIB_POSIXCHECK
1220# undef wcspbrk
1221# if HAVE_RAW_DECL_WCSPBRK
1222_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
1223 "use gnulib module wcspbrk for portability");
1224# endif
1225#endif
1226
1227
1228/* Find the first occurrence of NEEDLE in HAYSTACK. */
1229#if 0
1230# if !1
1231_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
1232 (const wchar_t *haystack, const wchar_t *needle));
1233# endif
1234 /* On some systems, this function is defined as an overloaded function:
1235 extern "C++" {
1236 const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
1237 wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
1238 } */
1239_GL_CXXALIAS_SYS_CAST2 (wcsstr,
1240 wchar_t *, (const wchar_t *, const wchar_t *),
1241 const wchar_t *, (const wchar_t *, const wchar_t *));
1242# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1243 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1244_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
1245 (wchar_t *haystack, const wchar_t *needle));
1246_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
1247 (const wchar_t *haystack, const wchar_t *needle));
1248# else
1249_GL_CXXALIASWARN (wcsstr);
1250# endif
1251#elif defined GNULIB_POSIXCHECK
1252# undef wcsstr
1253# if HAVE_RAW_DECL_WCSSTR
1254_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
1255 "use gnulib module wcsstr for portability");
1256# endif
1257#endif
1258
1259
1260/* Divide WCS into tokens separated by characters in DELIM. */
1261#if 0
1262# if !1
1263_GL_FUNCDECL_SYS (wcstok, wchar_t *,
1264 (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1265# endif
1266_GL_CXXALIAS_SYS (wcstok, wchar_t *,
1267 (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1268_GL_CXXALIASWARN (wcstok);
1269#elif defined GNULIB_POSIXCHECK
1270# undef wcstok
1271# if HAVE_RAW_DECL_WCSTOK
1272_GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
1273 "use gnulib module wcstok for portability");
1274# endif
1275#endif
1276
1277
1278/* Determine number of column positions required for first N wide
1279 characters (or fewer if S ends before this) in S. */
1280#if 0
1281# if 0
1282# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1283# undef wcswidth
1284# define wcswidth rpl_wcswidth
1285# endif
1286_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n));
1287_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
1288# else
1289# if !1
1290_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n));
1291# endif
1292_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
1293# endif
1294_GL_CXXALIASWARN (wcswidth);
1295#elif defined GNULIB_POSIXCHECK
1296# undef wcswidth
1297# if HAVE_RAW_DECL_WCSWIDTH
1298_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
1299 "use gnulib module wcswidth for portability");
1300# endif
1301#endif
1302
1303
1304#endif /* _GL_WCHAR_H */
1305#endif /* _GL_WCHAR_H */
1306#endif