source: mainline/uspace/lib/cpp/include/cwchar@ 3faf90ad

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 3faf90ad was bc56f30, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Make some libc and libposix headers usable in C++

These headers either get included from standard C++ headers,
or are standard themselves, which means any unnamespaced nonstandard
identifiers are a problem. This commit attempts to fix those
issues, and removes hacks previously used in libcpp to work around it.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 * Copyright (c) 2018 Jaroslav Jindrak
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef LIBCPP_WCHAR
30#define LIBCPP_WCHAR
31
32#include <wchar.h>
33#include <time.h>
34
35namespace std
36{
37 /* using ::mbstate_t; */
38 using ::size_t;
39 using ::wint_t;
40 using ::tm;
41
42 /* using ::wcscpy; */
43 /* using ::wcsncpy; */
44 /* using ::wcscat; */
45 /* using ::wcsncat; */
46 /* using ::wcsnxfrm; */
47
48 /* using ::wcslen; */
49 /* using ::wcscmp; */
50 /* using ::wcsncmp; */
51 /* using ::wcscoll; */
52 /* using ::wcschr; */
53 /* using ::wcsrchr; */
54 /* using ::wcsspn; */
55 /* using ::wcscspn; */
56 /* using ::wcspbrk; */
57 /* using ::wcsstr; */
58 /* using ::wcstok; */
59
60 /* using ::wmemcpy; */
61 /* using ::wmemmove; */
62 /* using ::wmemcmp; */
63 /* using ::wmemchr; */
64 /* using ::wmemset; */
65
66 /* using ::msbinit; */
67 /* using ::btowc; */
68 /* using ::wctob; */
69 /* using ::mbrlen; */
70 /* using ::mbrtowc; */
71 /* using ::wctomb; */
72 /* using ::mbsrtowcs; */
73 /* using ::wcsrtombs; */
74
75 /* using ::fgetwc; */
76 /* using ::getwc; */
77 /* using ::fgetws; */
78 /* using ::fputwc; */
79 /* using ::putwc; */
80 /* using ::fputws; */
81 /* using ::getwchar; */
82 /* using ::putwchar; */
83 /* using ::ungetwc; */
84 /* using ::fwide; */
85 /* using ::wscanf; */
86 /* using ::fwscanf; */
87 /* using ::swscanf; */
88 /* using ::vwscanf; */
89 /* using ::vfwscanf; */
90 /* using ::vswscanf; */
91 /* using ::wprintf; */
92 /* using ::fwprintf; */
93 /* using ::swprintf; */
94
95 /* using ::wcsftime; */
96 /* using ::wcstol; */
97 /* using ::wcstoll; */
98 /* using ::wcstoul; */
99 /* using ::wcstoull; */
100 /* using ::wcstof; */
101 /* using ::wcstod; */
102 /* using ::wcstold; */
103}
104
105#endif
Note: See TracBrowser for help on using the repository browser.