source: mainline/uspace/lib/cpp/include/cstdint@ 5608106c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 5608106c was ffd94b9, checked in by Dzejrou <dzejrou@…>, 7 years ago

cpp: cstdint type are now both in std and global namespace

  • Property mode set to 100644
File size: 3.9 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_CSTDINT
30#define LIBCPP_CSTDINT
31
32#include "internal/common.hpp"
33
34namespace std::hel
35{
36 extern "C" {
37 #include <stdint.h>
38 }
39}
40
41namespace std
42{
43 using int8_t = std::hel::int8_t;
44 using int16_t = std::hel::int16_t;
45 using int32_t = std::hel::int32_t;
46 using int64_t = std::hel::int64_t;
47
48 using intmax_t = std::hel::intmax_t;
49 using intptr_t = std::hel::intptr_t;
50
51 using int_fast8_t = std::hel::int8_t;
52 using int_fast16_t = std::hel::int16_t;
53 using int_fast32_t = std::hel::int32_t;
54 using int_fast64_t = std::hel::int64_t;
55
56 using int_least8_t = std::hel::int8_t;
57 using int_least16_t = std::hel::int16_t;
58 using int_least32_t = std::hel::int32_t;
59 using int_least64_t = std::hel::int64_t;
60
61 using uint8_t = std::hel::uint8_t;
62 using uint16_t = std::hel::uint16_t;
63 using uint32_t = std::hel::uint32_t;
64 using uint64_t = std::hel::uint64_t;
65
66 using uintmax_t = std::hel::uintmax_t;
67 using uintptr_t = std::hel::uintptr_t;
68
69 using uint_fast8_t = std::hel::uint8_t;
70 using uint_fast16_t = std::hel::uint16_t;
71 using uint_fast32_t = std::hel::uint32_t;
72 using uint_fast64_t = std::hel::uint64_t;
73
74 using uint_least8_t = std::hel::uint8_t;
75 using uint_least16_t = std::hel::uint16_t;
76 using uint_least32_t = std::hel::uint32_t;
77 using uint_least64_t = std::hel::uint64_t;
78}
79
80using int8_t = std::hel::int8_t;
81using int16_t = std::hel::int16_t;
82using int32_t = std::hel::int32_t;
83using int64_t = std::hel::int64_t;
84
85using intmax_t = std::hel::intmax_t;
86using intptr_t = std::hel::intptr_t;
87
88using int_fast8_t = std::hel::int8_t;
89using int_fast16_t = std::hel::int16_t;
90using int_fast32_t = std::hel::int32_t;
91using int_fast64_t = std::hel::int64_t;
92
93using int_least8_t = std::hel::int8_t;
94using int_least16_t = std::hel::int16_t;
95using int_least32_t = std::hel::int32_t;
96using int_least64_t = std::hel::int64_t;
97
98using uint8_t = std::hel::uint8_t;
99using uint16_t = std::hel::uint16_t;
100using uint32_t = std::hel::uint32_t;
101using uint64_t = std::hel::uint64_t;
102
103using uintmax_t = std::hel::uintmax_t;
104using uintptr_t = std::hel::uintptr_t;
105
106using uint_fast8_t = std::hel::uint8_t;
107using uint_fast16_t = std::hel::uint16_t;
108using uint_fast32_t = std::hel::uint32_t;
109using uint_fast64_t = std::hel::uint64_t;
110
111using uint_least8_t = std::hel::uint8_t;
112using uint_least16_t = std::hel::uint16_t;
113using uint_least32_t = std::hel::uint32_t;
114using uint_least64_t = std::hel::uint64_t;
115
116#endif
Note: See TracBrowser for help on using the repository browser.