]>
Commit | Line | Data |
---|---|---|
40e5dd58 BK |
1 | // -*- C++ -*- forwarding header. |
2 | ||
3 | // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. | |
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 | // | |
31 | // ISO C++ 14882: <ccytpe> | |
32 | // | |
33 | ||
34 | #ifndef _CPP_CCTYPE | |
35 | #define _CPP_CCTYPE 1 | |
36 | ||
37 | // This keeps isanum, et al from being propagated as macros. | |
38 | #if __linux__ | |
39 | #define __NO_CTYPE 1 | |
40 | #endif | |
41 | ||
42 | # pragma GCC system_header | |
43 | # include_next <ctype.h> | |
44 | ||
45 | // Sequester the C non-inline implementations in the _C_Swamp:: | |
46 | // namespace, and provide C++ inlines for them in the std:: namespace | |
47 | // where they belong. | |
48 | ||
49 | namespace std | |
50 | { | |
51 | // NB: If not using namespaces, can't have any of these definitions, | |
52 | // as they will duplicate what's in the global namespace. | |
53 | ||
54 | #ifdef toupper | |
55 | inline int | |
56 | _S_toupper_helper(int __c) { return toupper(__c); } | |
57 | # undef toupper | |
58 | inline int | |
59 | toupper(int __c) { return _S_toupper_helper(__c); } | |
60 | #else | |
61 | inline int | |
62 | toupper(int __c) { return ::toupper(__c); } | |
63 | #endif | |
64 | ||
65 | #ifdef tolower | |
66 | inline int | |
67 | _S_tolower_helper(int __c) { return tolower(__c); } | |
68 | # undef tolower | |
69 | inline int | |
70 | tolower(int __c) { return _S_tolower_helper(__c); } | |
71 | #else | |
72 | inline int | |
73 | tolower(int __c) { return ::tolower(__c); } | |
74 | #endif | |
75 | ||
76 | #ifdef isspace | |
77 | inline int | |
78 | _S_isspace_helper(int __c) { return isspace(__c); } | |
79 | # undef isspace | |
80 | inline int | |
81 | isspace(int __c) { return _S_isspace_helper(__c); } | |
82 | #else | |
83 | inline int | |
84 | isspace(int __c) { return ::isspace(__c); } | |
85 | #endif | |
86 | ||
87 | #ifdef isprint | |
88 | inline int | |
89 | _S_isprint_helper(int __c) { return isprint(__c); } | |
90 | # undef isprint | |
91 | inline int | |
92 | isprint(int __c) { return _S_isprint_helper(__c); } | |
93 | #else | |
94 | inline int | |
95 | isprint(int __c) { return ::isprint(__c); } | |
96 | #endif | |
97 | ||
98 | #ifdef iscntrl | |
99 | inline int | |
100 | _S_iscntrl_helper(int __c) { return iscntrl(__c); } | |
101 | # undef iscntrl | |
102 | inline int | |
103 | iscntrl(int __c) { return _S_iscntrl_helper(__c); } | |
104 | #else | |
105 | inline int | |
106 | iscntrl(int __c) { return ::iscntrl(__c); } | |
107 | #endif | |
108 | ||
109 | #ifdef isupper | |
110 | inline int | |
111 | _S_isupper_helper(int __c) { return isupper(__c); } | |
112 | # undef isupper | |
113 | inline int | |
114 | isupper(int __c) { return _S_isupper_helper(__c); } | |
115 | #else | |
116 | inline int | |
117 | isupper(int __c) { return ::isupper(__c); } | |
118 | #endif | |
119 | ||
120 | #ifdef islower | |
121 | inline int | |
122 | _S_islower_helper(int __c) { return islower(__c); } | |
123 | # undef islower | |
124 | inline int | |
125 | islower(int __c) { return _S_islower_helper(__c); } | |
126 | #else | |
127 | inline int | |
128 | islower(int __c) { return ::islower(__c); } | |
129 | #endif | |
130 | ||
131 | #ifdef isalpha | |
132 | inline int | |
133 | _S_isalpha_helper(int __c) { return isalpha(__c); } | |
134 | # undef isalpha | |
135 | inline int | |
136 | isalpha(int __c) { return _S_isalpha_helper(__c); } | |
137 | #else | |
138 | inline int | |
139 | isalpha(int __c) { return ::isalpha(__c); } | |
140 | #endif | |
141 | ||
142 | #ifdef isdigit | |
143 | inline int | |
144 | _S_isdigit_helper(int __c) { return isdigit(__c); } | |
145 | # undef isdigit | |
146 | inline int | |
147 | isdigit(int __c) { return _S_isdigit_helper(__c); } | |
148 | #else | |
149 | inline int | |
150 | isdigit(int __c) { return ::isdigit(__c); } | |
151 | #endif | |
152 | ||
153 | #ifdef ispunct | |
154 | inline int | |
155 | _S_ispunct_helper(int __c) { return ispunct(__c); } | |
156 | # undef ispunct | |
157 | inline int | |
158 | ispunct(int __c) { return _S_ispunct_helper(__c); } | |
159 | #else | |
160 | inline int | |
161 | ispunct(int __c) { return ::ispunct(__c); } | |
162 | #endif | |
163 | ||
164 | #ifdef isxdigit | |
165 | inline int | |
166 | _S_isxdigit_helper(int __c) { return isxdigit(__c); } | |
167 | # undef isxdigit | |
168 | inline int | |
169 | isxdigit(int __c) { return _S_isxdigit_helper(__c); } | |
170 | #else | |
171 | inline int | |
172 | isxdigit(int __c) { return ::isxdigit(__c); } | |
173 | #endif | |
174 | ||
175 | #ifdef isalnum | |
176 | inline int | |
177 | _S_isalnum_helper(int __c) { return isalnum(__c); } | |
178 | # undef isalnum | |
179 | inline int | |
180 | isalnum(int __c) { return _S_isalnum_helper(__c); } | |
181 | #else | |
182 | inline int | |
183 | isalnum(int __c) { return ::isalnum(__c); } | |
184 | #endif | |
185 | ||
186 | #ifdef isgraph | |
187 | inline int | |
188 | _S_isgraph_helper(int __c) { return isgraph(__c); } | |
189 | # undef isgraph | |
190 | inline int | |
191 | isgraph(int __c) { return _S_isgraph_helper(__c); } | |
192 | #else | |
193 | inline int | |
194 | isgraph(int __c) { return ::isgraph(__c); } | |
195 | #endif | |
196 | ||
197 | } // namespace std | |
198 | ||
199 | #endif // _CPP_CCTYPE | |
200 | ||
201 | ||
202 | ||
203 | ||
204 | ||
205 | ||
206 | ||
207 | ||
208 | ||
209 | ||
210 | ||
211 |