blob: 7165c1f6965a38aa5a2d3dfe8f8765ea4d9f441c [file] [log] [blame]
Jeff Thompson86b6d642013-10-17 15:01:56 -07001/*
2 *
3 * Copyright (c) 1998-2002
4 * John Maddock
5 *
6 * Use, modification and distribution are subject to the
7 * Boost Software License, Version 1.0. (See accompanying file
8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 *
10 */
11
12 /*
13 * LOCATION: see http://www.boost.org for most recent version.
14 * FILE ndnboost/regex/config/cwchar.hpp
15 * VERSION see <ndnboost/version.hpp>
16 * DESCRIPTION: regex wide character string fixes.
17 */
18
19#ifndef NDNBOOST_REGEX_CONFIG_CWCHAR_HPP
20#define NDNBOOST_REGEX_CONFIG_CWCHAR_HPP
21
22#include <cwchar>
23#include <cwctype>
24#include <ndnboost/config.hpp>
25
26#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
27// apparently this is required for the RW STL on Linux:
28#undef iswalnum
29#undef iswalpha
30#undef iswblank
31#undef iswcntrl
32#undef iswdigit
33#undef iswgraph
34#undef iswlower
35#undef iswprint
36#undef iswprint
37#undef iswpunct
38#undef iswspace
39#undef iswupper
40#undef iswxdigit
41#undef iswctype
42#undef towlower
43#undef towupper
44#undef towctrans
45#undef wctrans
46#undef wctype
47#endif
48
49namespace std{
50
51#ifndef NDNBOOST_NO_STDC_NAMESPACE
52extern "C"{
53#endif
54
55#ifdef iswalnum
56inline int (iswalnum)(wint_t i)
57{ return iswalnum(i); }
58#undef iswalnum
59#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
60using ::iswalnum;
61#endif
62
63#ifdef iswalpha
64inline int (iswalpha)(wint_t i)
65{ return iswalpha(i); }
66#undef iswalpha
67#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
68using ::iswalpha;
69#endif
70
71#ifdef iswcntrl
72inline int (iswcntrl)(wint_t i)
73{ return iswcntrl(i); }
74#undef iswcntrl
75#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
76using ::iswcntrl;
77#endif
78
79#ifdef iswdigit
80inline int (iswdigit)(wint_t i)
81{ return iswdigit(i); }
82#undef iswdigit
83#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
84using ::iswdigit;
85#endif
86
87#ifdef iswgraph
88inline int (iswgraph)(wint_t i)
89{ return iswgraph(i); }
90#undef iswgraph
91#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
92using ::iswgraph;
93#endif
94
95#ifdef iswlower
96inline int (iswlower)(wint_t i)
97{ return iswlower(i); }
98#undef iswlower
99#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
100using ::iswlower;
101#endif
102
103#ifdef iswprint
104inline int (iswprint)(wint_t i)
105{ return iswprint(i); }
106#undef iswprint
107#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
108using ::iswprint;
109#endif
110
111#ifdef iswpunct
112inline int (iswpunct)(wint_t i)
113{ return iswpunct(i); }
114#undef iswpunct
115#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
116using ::iswpunct;
117#endif
118
119#ifdef iswspace
120inline int (iswspace)(wint_t i)
121{ return iswspace(i); }
122#undef iswspace
123#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
124using ::iswspace;
125#endif
126
127#ifdef iswupper
128inline int (iswupper)(wint_t i)
129{ return iswupper(i); }
130#undef iswupper
131#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
132using ::iswupper;
133#endif
134
135#ifdef iswxdigit
136inline int (iswxdigit)(wint_t i)
137{ return iswxdigit(i); }
138#undef iswxdigit
139#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
140using ::iswxdigit;
141#endif
142
143#ifdef towlower
144inline wint_t (towlower)(wint_t i)
145{ return towlower(i); }
146#undef towlower
147#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
148using ::towlower;
149#endif
150
151#ifdef towupper
152inline wint_t (towupper)(wint_t i)
153{ return towupper(i); }
154#undef towupper
155#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
156using :: towupper;
157#endif
158
159#ifdef wcscmp
160inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2)
161{ return wcscmp(p1,p2); }
162#undef wcscmp
163#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
164using ::wcscmp;
165#endif
166
167#ifdef wcscoll
168inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2)
169{ return wcscoll(p1,p2); }
170#undef wcscoll
171#elif defined(NDNBOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE)
172using ::wcscoll;
173#endif
174
175#ifdef wcscpy
176inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2)
177{ return wcscpy(p1,p2); }
178#undef wcscpy
179#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
180using ::wcscpy;
181#endif
182
183#ifdef wcslen
184inline size_t (wcslen)(const wchar_t *p)
185{ return wcslen(p); }
186#undef wcslen
187#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
188using ::wcslen;
189#endif
190
191#ifdef wcsxfrm
192size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s)
193{ return wcsxfrm(p1,p2,s); }
194#undef wcsxfrm
195#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
196using ::wcsxfrm;
197#endif
198
199
200#ifndef NDNBOOST_NO_STDC_NAMESPACE
201} // extern "C"
202#endif
203
204} // namespace std
205
206#endif
207