source: mainline/abi/include/_bits/stdint.h@ 78fd6ef

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 78fd6ef was 7c3fb9b, checked in by Jiri Svoboda <jiri@…>, 7 years ago

Fix block comment formatting (ccheck).

  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*
2 * Copyright (c) 2017 CZ.NIC, z.s.p.o.
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/*
30 * Authors:
31 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com>
32 */
33
34/** @addtogroup bits
35 * @{
36 */
37/** @file
38 */
39
40#ifndef _BITS_STDINT_H_
41#define _BITS_STDINT_H_
42
43#include <_bits/macros.h>
44
45typedef __INT8_TYPE__ int8_t;
46typedef __INT8_TYPE__ int_least8_t;
47typedef __INT8_TYPE__ int_fast8_t;
48
49typedef __UINT8_TYPE__ uint8_t;
50typedef __UINT8_TYPE__ uint_least8_t;
51typedef __UINT8_TYPE__ uint_fast8_t;
52
53typedef __INT16_TYPE__ int16_t;
54typedef __INT16_TYPE__ int_least16_t;
55typedef __INT16_TYPE__ int_fast16_t;
56
57typedef __UINT16_TYPE__ uint16_t;
58typedef __UINT16_TYPE__ uint_least16_t;
59typedef __UINT16_TYPE__ uint_fast16_t;
60
61typedef __INT32_TYPE__ int32_t;
62typedef __INT32_TYPE__ int_least32_t;
63typedef __INT32_TYPE__ int_fast32_t;
64
65typedef __UINT32_TYPE__ uint32_t;
66typedef __UINT32_TYPE__ uint_least32_t;
67typedef __UINT32_TYPE__ uint_fast32_t;
68
69typedef __INT64_TYPE__ int64_t;
70typedef __INT64_TYPE__ int_least64_t;
71typedef __INT64_TYPE__ int_fast64_t;
72
73typedef __UINT64_TYPE__ uint64_t;
74typedef __UINT64_TYPE__ uint_least64_t;
75typedef __UINT64_TYPE__ uint_fast64_t;
76
77#define INT8_MIN __INT8_MIN__
78#define INT_LEAST8_MIN __INT8_MIN__
79#define INT_FAST8_MIN __INT8_MIN__
80
81#define INT8_MAX __INT8_MAX__
82#define INT_LEAST8_MAX __INT8_MAX__
83#define INT_FAST8_MAX __INT8_MAX__
84
85#define UINT8_MIN __UINT8_C(0)
86#define UINT_LEAST8_MIN __UINT8_C(0)
87#define UINT_FAST8_MIN __UINT8_C(0)
88
89#define UINT8_MAX __UINT8_MAX__
90#define UINT_LEAST8_MAX __UINT8_MAX__
91#define UINT_FAST8_MAX __UINT8_MAX__
92
93#define INT16_MIN __INT16_MIN__
94#define INT_LEAST16_MIN __INT16_MIN__
95#define INT_FAST16_MIN __INT16_MIN__
96
97#define INT16_MAX __INT16_MAX__
98#define INT_LEAST16_MAX __INT16_MAX__
99#define INT_FAST16_MAX __INT16_MAX__
100
101#define UINT16_MIN __UINT16_C(0)
102#define UINT_LEAST16_MIN __UINT16_C(0)
103#define UINT_FAST16_MIN __UINT16_C(0)
104
105#define UINT16_MAX __UINT16_MAX__
106#define UINT_LEAST16_MAX __UINT16_MAX__
107#define UINT_FAST16_MAX __UINT16_MAX__
108
109#define INT32_MIN __INT32_MIN__
110#define INT_LEAST32_MIN __INT32_MIN__
111#define INT_FAST32_MIN __INT32_MIN__
112
113#define INT32_MAX __INT32_MAX__
114#define INT_LEAST32_MAX __INT32_MAX__
115#define INT_FAST32_MAX __INT32_MAX__
116
117#define UINT32_MIN __UINT32_C(0)
118#define UINT_LEAST32_MIN __UINT32_C(0)
119#define UINT_FAST32_MIN __UINT32_C(0)
120
121#define UINT32_MAX __UINT32_MAX__
122#define UINT_LEAST32_MAX __UINT32_MAX__
123#define UINT_FAST32_MAX __UINT32_MAX__
124
125#define INT64_MIN __INT64_MIN__
126#define INT_LEAST64_MIN __INT64_MIN__
127#define INT_FAST64_MIN __INT64_MIN__
128
129#define INT64_MAX __INT64_MAX__
130#define INT_LEAST64_MAX __INT64_MAX__
131#define INT_FAST64_MAX __INT64_MAX__
132
133#define UINT64_MIN __UINT64_C(0)
134#define UINT_LEAST64_MIN __UINT64_C(0)
135#define UINT_FAST64_MIN __UINT64_C(0)
136
137#define UINT64_MAX __UINT64_MAX__
138#define UINT_LEAST64_MAX __UINT64_MAX__
139#define UINT_FAST64_MAX __UINT64_MAX__
140
141#define INT8_C(x) __INT8_C(x)
142#define INT16_C(x) __INT16_C(x)
143#define INT32_C(x) __INT32_C(x)
144#define INT64_C(x) __INT64_C(x)
145#define UINT8_C(x) __UINT8_C(x)
146#define UINT16_C(x) __UINT16_C(x)
147#define UINT32_C(x) __UINT32_C(x)
148#define UINT64_C(x) __UINT64_C(x)
149
150typedef __INTPTR_TYPE__ intptr_t;
151typedef __UINTPTR_TYPE__ uintptr_t;
152
153#define INTPTR_MIN __INTPTR_MIN__
154#define INTPTR_MAX __INTPTR_MAX__
155#define UINTPTR_MIN __UINTPTR_C(0)
156#define UINTPTR_MAX __UINTPTR_MAX__
157
158#ifndef __HELENOS_DISABLE_INTMAX__
159
160typedef __INTMAX_TYPE__ intmax_t;
161typedef __UINTMAX_TYPE__ uintmax_t;
162
163#define INTMAX_MIN __INTMAX_MIN__
164#define INTMAX_MAX __INTMAX_MAX__
165#define UINTMAX_MIN __UINTMAX_C(0)
166#define UINTMAX_MAX __UINTMAX_MAX__
167
168#define INTMAX_C(x) __INTMAX_C(x)
169#define UINTMAX_C(x) __UINTMAX_C(x)
170
171#endif /* __HELENOS_DISABLE_INTMAX__ */
172
173#define PTRDIFF_MIN __PTRDIFF_MIN__
174#define PTRDIFF_MAX __PTRDIFF_MAX__
175
176#define SIZE_MIN 0
177#define SIZE_MAX __SIZE_MAX__
178
179#define WINT_MIN __WINT_MIN__
180#define WINT_MAX __WINT_MAX__
181
182#include <_bits/WCHAR_MIN.h>
183#include <_bits/WCHAR_MAX.h>
184
185/* Use nonstandard 128-bit types if they are supported by the compiler. */
186
187#ifdef __SIZEOF_INT128__
188typedef __int128 int128_t;
189typedef unsigned __int128 uint128_t;
190#endif
191
192#endif
193
194/** @}
195 */
Note: See TracBrowser for help on using the repository browser.