]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/include/c_std/bits/std_cwchar.h
configure.in: Change GLIBCPP_ENABLE_SHADOW to GLIBCPP_ENABLE_CHEADERS.
[thirdparty/gcc.git] / libstdc++-v3 / include / c_std / bits / std_cwchar.h
CommitLineData
98e6e789 1// -*- C++ -*- forwarding header.
22aef514 2
98e6e789 3// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
22aef514
BK
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 2, or (at your option)
9// any later version.
10
11// This library 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 along
17// with this library; see the file COPYING. If not, write to the Free
18// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19// USA.
20
21// As a special exception, you may use this file as part of a free software
22// library without restriction. Specifically, if other files instantiate
23// templates or use macros or inline functions from this file, or you compile
24// this file and link it with other files to produce an executable, this
25// file does not by itself cause the resulting executable to be covered by
26// the GNU General Public License. This exception does not however
27// invalidate any other reasons why the executable file might be covered by
28// the GNU General Public License.
29
30//
98e6e789
BK
31// ISO C++ 14882: ???
32//
22aef514 33
98e6e789 34// Note: This is not a conforming implementation.
22aef514 35
98e6e789
BK
36#ifndef _CPP_CWCHAR
37#define _CPP_CWCHAR 1
38
39#include <bits/c++config.h>
40#include <bits/std_cstdio.h>
41#include <bits/std_cstdarg.h>
42
43#if _GLIBCPP_USE_WCHAR_T
44#pragma GCC system_header
45#include <wchar.h>
46
47// Get rid of those macros defined in <wchar.h> in lieu of real functions.
48#undef getwchar
49
50namespace std
51{
52 using ::wint_t;
53 using ::mbstate_t;
54
55 extern "C" wint_t btowc(int);
56 extern "C" int wctob(wint_t);
57 extern "C" wint_t fgetwc(FILE*);
58 extern "C" wchar_t* fgetws(wchar_t*, int, FILE*);
59 extern "C" wint_t fputwc(wchar_t, FILE*);
60 extern "C" int fputws(const wchar_t*, FILE*);
61 extern "C" int fwide(FILE*, int);
62 extern "C" int fwprintf(FILE*, const wchar_t*, ...);
63 extern "C" int fwscanf(FILE*, const wchar_t*, ...);
64 extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...);
65 extern "C" int swscanf(const wchar_t*, const wchar_t*, ...);
66 extern "C" int vfwprintf(FILE*, const wchar_t*, va_list);
67 extern "C" int vfwscanf(FILE*, const wchar_t*, va_list);
68 extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
69 extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list);
70 extern "C" int vwprintf(const wchar_t*, va_list);
71 extern "C" int vwscanf(const wchar_t*, va_list);
72 extern "C" int wprintf(const wchar_t*, ...);
73 extern "C" int wscanf(const wchar_t*, ...);
74 extern "C" wint_t getwc(FILE* stream);
75 extern "C" wint_t getwchar(void);
76 extern "C" int mbsinit(const mbstate_t*);
77 extern "C" size_t mbrlen(const char*, size_t, mbstate_t*);
78 extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*);
79 extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*);
80 extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*);
81 extern "C" wint_t putwc(wchar_t, FILE*);
82 extern "C" wint_t putwchar(wchar_t);
83 extern "C" wint_t ungetwc(wint_t, FILE*);
84 extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*);
85 extern "C" double wcstod(const wchar_t*, wchar_t**);
86 extern "C" float wcstof(const wchar_t*, wchar_t**);
87 extern "C" long int wcstol(const wchar_t*, wchar_t**, int);
88 extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int);
89 extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*);
90 extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
91 extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*);
92 extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t);
93 extern "C" int wcscmp(const wchar_t*, const wchar_t*);
94 extern "C" int wcscoll(const wchar_t*, const wchar_t*);
95 extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t);
96 extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
97 extern "C" wchar_t* wcschr(const wchar_t*, wchar_t);
98 extern "C" size_t wcscspn(const wchar_t*, const wchar_t*);
99 extern "C" size_t wcslen(const wchar_t*);
100 extern "C" wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
101 extern "C" wchar_t* wcsrchr(const wchar_t*, wchar_t);
102 extern "C" size_t wcsspn(const wchar_t*, const wchar_t*);
103 extern "C" wchar_t* wcsstr(const wchar_t*, const wchar_t*);
104 extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
105 extern "C" wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
106 extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t);
107 //extern "C" int wmemcmp(wchar_t*, const wchar_t*, size_t);
108 extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t);
109 extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
110 extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t);
111 extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
22aef514
BK
112
113#if 0
98e6e789
BK
114 // Full C99 listing
115 extern "C" long double wcstold(const wchar_t*, wchar_t**);
116 extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int);
117 extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int);
22aef514 118#endif
98e6e789
BK
119}
120
121#else
122extern "C"
123{
124 typedef struct
125 {
126 int __fill[6];
127 } mbstate_t;
128}
129
130namespace std
131{
132 using ::mbstate_t;
133}
134#endif //_GLIBCPP_USE_WCHAR_T
135
136
137#endif
138
139
140
141
142
143
22aef514 144
22aef514 145
22aef514 146
22aef514 147
22aef514 148
22aef514 149
22aef514 150
22aef514 151
22aef514 152
22aef514 153
22aef514
BK
154
155
156
157