sl@0
|
1 |
// boost cstdint.hpp header file ------------------------------------------//
|
sl@0
|
2 |
|
sl@0
|
3 |
// (C) Copyright Beman Dawes 1999.
|
sl@0
|
4 |
// (C) Copyright Jens Mauer 2001
|
sl@0
|
5 |
// (C) Copyright John Maddock 2001
|
sl@0
|
6 |
// Distributed under the Boost
|
sl@0
|
7 |
// Software License, Version 1.0. (See accompanying file
|
sl@0
|
8 |
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
9 |
|
sl@0
|
10 |
// See http://www.boost.org/libs/integer for documentation.
|
sl@0
|
11 |
|
sl@0
|
12 |
// Revision History
|
sl@0
|
13 |
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
|
sl@0
|
14 |
// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer)
|
sl@0
|
15 |
// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
|
sl@0
|
16 |
// 12 Nov 00 Merged <boost/stdint.h> (Jens Maurer)
|
sl@0
|
17 |
// 23 Sep 00 Added INTXX_C macro support (John Maddock).
|
sl@0
|
18 |
// 22 Sep 00 Better 64-bit support (John Maddock)
|
sl@0
|
19 |
// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost
|
sl@0
|
20 |
// 8 Aug 99 Initial version (Beman Dawes)
|
sl@0
|
21 |
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifndef BOOST_CSTDINT_HPP
|
sl@0
|
24 |
#define BOOST_CSTDINT_HPP
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <boost/config.hpp>
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
#ifdef BOOST_HAS_STDINT_H
|
sl@0
|
30 |
|
sl@0
|
31 |
// The following #include is an implementation artifact; not part of interface.
|
sl@0
|
32 |
# ifdef __hpux
|
sl@0
|
33 |
// HP-UX has a vaguely nice <stdint.h> in a non-standard location
|
sl@0
|
34 |
# include <inttypes.h>
|
sl@0
|
35 |
# ifdef __STDC_32_MODE__
|
sl@0
|
36 |
// this is triggered with GCC, because it defines __cplusplus < 199707L
|
sl@0
|
37 |
# define BOOST_NO_INT64_T
|
sl@0
|
38 |
# endif
|
sl@0
|
39 |
# elif defined(__FreeBSD__) || defined(__IBMCPP__)
|
sl@0
|
40 |
# include <inttypes.h>
|
sl@0
|
41 |
# else
|
sl@0
|
42 |
# include <stdint.h>
|
sl@0
|
43 |
|
sl@0
|
44 |
// There is a bug in Cygwin two _C macros
|
sl@0
|
45 |
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
|
sl@0
|
46 |
# undef INTMAX_C
|
sl@0
|
47 |
# undef UINTMAX_C
|
sl@0
|
48 |
# define INTMAX_C(c) c##LL
|
sl@0
|
49 |
# define UINTMAX_C(c) c##ULL
|
sl@0
|
50 |
# endif
|
sl@0
|
51 |
|
sl@0
|
52 |
# endif
|
sl@0
|
53 |
|
sl@0
|
54 |
#ifdef __QNX__
|
sl@0
|
55 |
|
sl@0
|
56 |
// QNX (Dinkumware stdlib) defines these as non-standard names.
|
sl@0
|
57 |
// Reflect to the standard names.
|
sl@0
|
58 |
|
sl@0
|
59 |
typedef ::intleast8_t int_least8_t;
|
sl@0
|
60 |
typedef ::intfast8_t int_fast8_t;
|
sl@0
|
61 |
typedef ::uintleast8_t uint_least8_t;
|
sl@0
|
62 |
typedef ::uintfast8_t uint_fast8_t;
|
sl@0
|
63 |
|
sl@0
|
64 |
typedef ::intleast16_t int_least16_t;
|
sl@0
|
65 |
typedef ::intfast16_t int_fast16_t;
|
sl@0
|
66 |
typedef ::uintleast16_t uint_least16_t;
|
sl@0
|
67 |
typedef ::uintfast16_t uint_fast16_t;
|
sl@0
|
68 |
|
sl@0
|
69 |
typedef ::intleast32_t int_least32_t;
|
sl@0
|
70 |
typedef ::intfast32_t int_fast32_t;
|
sl@0
|
71 |
typedef ::uintleast32_t uint_least32_t;
|
sl@0
|
72 |
typedef ::uintfast32_t uint_fast32_t;
|
sl@0
|
73 |
|
sl@0
|
74 |
# ifndef BOOST_NO_INT64_T
|
sl@0
|
75 |
|
sl@0
|
76 |
typedef ::intleast64_t int_least64_t;
|
sl@0
|
77 |
typedef ::intfast64_t int_fast64_t;
|
sl@0
|
78 |
typedef ::uintleast64_t uint_least64_t;
|
sl@0
|
79 |
typedef ::uintfast64_t uint_fast64_t;
|
sl@0
|
80 |
|
sl@0
|
81 |
# endif
|
sl@0
|
82 |
|
sl@0
|
83 |
#endif
|
sl@0
|
84 |
|
sl@0
|
85 |
namespace boost
|
sl@0
|
86 |
{
|
sl@0
|
87 |
|
sl@0
|
88 |
using ::int8_t;
|
sl@0
|
89 |
using ::int_least8_t;
|
sl@0
|
90 |
using ::int_fast8_t;
|
sl@0
|
91 |
using ::uint8_t;
|
sl@0
|
92 |
using ::uint_least8_t;
|
sl@0
|
93 |
using ::uint_fast8_t;
|
sl@0
|
94 |
|
sl@0
|
95 |
using ::int16_t;
|
sl@0
|
96 |
using ::int_least16_t;
|
sl@0
|
97 |
using ::int_fast16_t;
|
sl@0
|
98 |
using ::uint16_t;
|
sl@0
|
99 |
using ::uint_least16_t;
|
sl@0
|
100 |
using ::uint_fast16_t;
|
sl@0
|
101 |
|
sl@0
|
102 |
using ::int32_t;
|
sl@0
|
103 |
using ::int_least32_t;
|
sl@0
|
104 |
using ::int_fast32_t;
|
sl@0
|
105 |
using ::uint32_t;
|
sl@0
|
106 |
using ::uint_least32_t;
|
sl@0
|
107 |
using ::uint_fast32_t;
|
sl@0
|
108 |
|
sl@0
|
109 |
# ifndef BOOST_NO_INT64_T
|
sl@0
|
110 |
|
sl@0
|
111 |
using ::int64_t;
|
sl@0
|
112 |
using ::int_least64_t;
|
sl@0
|
113 |
using ::int_fast64_t;
|
sl@0
|
114 |
using ::uint64_t;
|
sl@0
|
115 |
using ::uint_least64_t;
|
sl@0
|
116 |
using ::uint_fast64_t;
|
sl@0
|
117 |
|
sl@0
|
118 |
# endif
|
sl@0
|
119 |
|
sl@0
|
120 |
using ::intmax_t;
|
sl@0
|
121 |
using ::uintmax_t;
|
sl@0
|
122 |
|
sl@0
|
123 |
} // namespace boost
|
sl@0
|
124 |
|
sl@0
|
125 |
#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__)
|
sl@0
|
126 |
// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
|
sl@0
|
127 |
# include <inttypes.h>
|
sl@0
|
128 |
|
sl@0
|
129 |
namespace boost {
|
sl@0
|
130 |
|
sl@0
|
131 |
using ::int8_t;
|
sl@0
|
132 |
typedef int8_t int_least8_t;
|
sl@0
|
133 |
typedef int8_t int_fast8_t;
|
sl@0
|
134 |
using ::uint8_t;
|
sl@0
|
135 |
typedef uint8_t uint_least8_t;
|
sl@0
|
136 |
typedef uint8_t uint_fast8_t;
|
sl@0
|
137 |
|
sl@0
|
138 |
using ::int16_t;
|
sl@0
|
139 |
typedef int16_t int_least16_t;
|
sl@0
|
140 |
typedef int16_t int_fast16_t;
|
sl@0
|
141 |
using ::uint16_t;
|
sl@0
|
142 |
typedef uint16_t uint_least16_t;
|
sl@0
|
143 |
typedef uint16_t uint_fast16_t;
|
sl@0
|
144 |
|
sl@0
|
145 |
using ::int32_t;
|
sl@0
|
146 |
typedef int32_t int_least32_t;
|
sl@0
|
147 |
typedef int32_t int_fast32_t;
|
sl@0
|
148 |
using ::uint32_t;
|
sl@0
|
149 |
typedef uint32_t uint_least32_t;
|
sl@0
|
150 |
typedef uint32_t uint_fast32_t;
|
sl@0
|
151 |
|
sl@0
|
152 |
# ifndef BOOST_NO_INT64_T
|
sl@0
|
153 |
|
sl@0
|
154 |
using ::int64_t;
|
sl@0
|
155 |
typedef int64_t int_least64_t;
|
sl@0
|
156 |
typedef int64_t int_fast64_t;
|
sl@0
|
157 |
using ::uint64_t;
|
sl@0
|
158 |
typedef uint64_t uint_least64_t;
|
sl@0
|
159 |
typedef uint64_t uint_fast64_t;
|
sl@0
|
160 |
|
sl@0
|
161 |
typedef int64_t intmax_t;
|
sl@0
|
162 |
typedef uint64_t uintmax_t;
|
sl@0
|
163 |
|
sl@0
|
164 |
# else
|
sl@0
|
165 |
|
sl@0
|
166 |
typedef int32_t intmax_t;
|
sl@0
|
167 |
typedef uint32_t uintmax_t;
|
sl@0
|
168 |
|
sl@0
|
169 |
# endif
|
sl@0
|
170 |
|
sl@0
|
171 |
} // namespace boost
|
sl@0
|
172 |
|
sl@0
|
173 |
#else // BOOST_HAS_STDINT_H
|
sl@0
|
174 |
|
sl@0
|
175 |
# include <boost/limits.hpp> // implementation artifact; not part of interface
|
sl@0
|
176 |
# include <limits.h> // needed for limits macros
|
sl@0
|
177 |
|
sl@0
|
178 |
|
sl@0
|
179 |
namespace boost
|
sl@0
|
180 |
{
|
sl@0
|
181 |
|
sl@0
|
182 |
// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
|
sl@0
|
183 |
// platforms. For other systems, they will have to be hand tailored.
|
sl@0
|
184 |
//
|
sl@0
|
185 |
// Because the fast types are assumed to be the same as the undecorated types,
|
sl@0
|
186 |
// it may be possible to hand tailor a more efficient implementation. Such
|
sl@0
|
187 |
// an optimization may be illusionary; on the Intel x86-family 386 on, for
|
sl@0
|
188 |
// example, byte arithmetic and load/stores are as fast as "int" sized ones.
|
sl@0
|
189 |
|
sl@0
|
190 |
// 8-bit types ------------------------------------------------------------//
|
sl@0
|
191 |
|
sl@0
|
192 |
# if UCHAR_MAX == 0xff
|
sl@0
|
193 |
typedef signed char int8_t;
|
sl@0
|
194 |
typedef signed char int_least8_t;
|
sl@0
|
195 |
typedef signed char int_fast8_t;
|
sl@0
|
196 |
typedef unsigned char uint8_t;
|
sl@0
|
197 |
typedef unsigned char uint_least8_t;
|
sl@0
|
198 |
typedef unsigned char uint_fast8_t;
|
sl@0
|
199 |
# else
|
sl@0
|
200 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
201 |
# endif
|
sl@0
|
202 |
|
sl@0
|
203 |
// 16-bit types -----------------------------------------------------------//
|
sl@0
|
204 |
|
sl@0
|
205 |
# if USHRT_MAX == 0xffff
|
sl@0
|
206 |
# if defined(__crayx1)
|
sl@0
|
207 |
// The Cray X1 has a 16-bit short, however it is not recommend
|
sl@0
|
208 |
// for use in performance critical code.
|
sl@0
|
209 |
typedef short int16_t;
|
sl@0
|
210 |
typedef short int_least16_t;
|
sl@0
|
211 |
typedef int int_fast16_t;
|
sl@0
|
212 |
typedef unsigned short uint16_t;
|
sl@0
|
213 |
typedef unsigned short uint_least16_t;
|
sl@0
|
214 |
typedef unsigned int uint_fast16_t;
|
sl@0
|
215 |
# else
|
sl@0
|
216 |
typedef short int16_t;
|
sl@0
|
217 |
typedef short int_least16_t;
|
sl@0
|
218 |
typedef short int_fast16_t;
|
sl@0
|
219 |
typedef unsigned short uint16_t;
|
sl@0
|
220 |
typedef unsigned short uint_least16_t;
|
sl@0
|
221 |
typedef unsigned short uint_fast16_t;
|
sl@0
|
222 |
# endif
|
sl@0
|
223 |
# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
|
sl@0
|
224 |
// no 16-bit types on Cray:
|
sl@0
|
225 |
typedef short int_least16_t;
|
sl@0
|
226 |
typedef short int_fast16_t;
|
sl@0
|
227 |
typedef unsigned short uint_least16_t;
|
sl@0
|
228 |
typedef unsigned short uint_fast16_t;
|
sl@0
|
229 |
# else
|
sl@0
|
230 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
231 |
# endif
|
sl@0
|
232 |
|
sl@0
|
233 |
// 32-bit types -----------------------------------------------------------//
|
sl@0
|
234 |
|
sl@0
|
235 |
# if ULONG_MAX == 0xffffffff
|
sl@0
|
236 |
typedef long int32_t;
|
sl@0
|
237 |
typedef long int_least32_t;
|
sl@0
|
238 |
typedef long int_fast32_t;
|
sl@0
|
239 |
typedef unsigned long uint32_t;
|
sl@0
|
240 |
typedef unsigned long uint_least32_t;
|
sl@0
|
241 |
typedef unsigned long uint_fast32_t;
|
sl@0
|
242 |
# elif UINT_MAX == 0xffffffff
|
sl@0
|
243 |
typedef int int32_t;
|
sl@0
|
244 |
typedef int int_least32_t;
|
sl@0
|
245 |
typedef int int_fast32_t;
|
sl@0
|
246 |
typedef unsigned int uint32_t;
|
sl@0
|
247 |
typedef unsigned int uint_least32_t;
|
sl@0
|
248 |
typedef unsigned int uint_fast32_t;
|
sl@0
|
249 |
# else
|
sl@0
|
250 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
251 |
# endif
|
sl@0
|
252 |
|
sl@0
|
253 |
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
|
sl@0
|
254 |
|
sl@0
|
255 |
# if defined(BOOST_HAS_LONG_LONG) && \
|
sl@0
|
256 |
!defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
|
sl@0
|
257 |
(!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
|
sl@0
|
258 |
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
sl@0
|
259 |
# if defined(__hpux)
|
sl@0
|
260 |
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
|
sl@0
|
261 |
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
|
sl@0
|
262 |
// 2**64 - 1
|
sl@0
|
263 |
# else
|
sl@0
|
264 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
265 |
# endif
|
sl@0
|
266 |
|
sl@0
|
267 |
typedef ::boost::long_long_type intmax_t;
|
sl@0
|
268 |
typedef ::boost::ulong_long_type uintmax_t;
|
sl@0
|
269 |
typedef ::boost::long_long_type int64_t;
|
sl@0
|
270 |
typedef ::boost::long_long_type int_least64_t;
|
sl@0
|
271 |
typedef ::boost::long_long_type int_fast64_t;
|
sl@0
|
272 |
typedef ::boost::ulong_long_type uint64_t;
|
sl@0
|
273 |
typedef ::boost::ulong_long_type uint_least64_t;
|
sl@0
|
274 |
typedef ::boost::ulong_long_type uint_fast64_t;
|
sl@0
|
275 |
|
sl@0
|
276 |
# elif ULONG_MAX != 0xffffffff
|
sl@0
|
277 |
|
sl@0
|
278 |
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
|
sl@0
|
279 |
typedef long intmax_t;
|
sl@0
|
280 |
typedef unsigned long uintmax_t;
|
sl@0
|
281 |
typedef long int64_t;
|
sl@0
|
282 |
typedef long int_least64_t;
|
sl@0
|
283 |
typedef long int_fast64_t;
|
sl@0
|
284 |
typedef unsigned long uint64_t;
|
sl@0
|
285 |
typedef unsigned long uint_least64_t;
|
sl@0
|
286 |
typedef unsigned long uint_fast64_t;
|
sl@0
|
287 |
# else
|
sl@0
|
288 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
289 |
# endif
|
sl@0
|
290 |
# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
|
sl@0
|
291 |
__extension__ typedef long long intmax_t;
|
sl@0
|
292 |
__extension__ typedef unsigned long long uintmax_t;
|
sl@0
|
293 |
__extension__ typedef long long int64_t;
|
sl@0
|
294 |
__extension__ typedef long long int_least64_t;
|
sl@0
|
295 |
__extension__ typedef long long int_fast64_t;
|
sl@0
|
296 |
__extension__ typedef unsigned long long uint64_t;
|
sl@0
|
297 |
__extension__ typedef unsigned long long uint_least64_t;
|
sl@0
|
298 |
__extension__ typedef unsigned long long uint_fast64_t;
|
sl@0
|
299 |
# elif defined(BOOST_HAS_MS_INT64)
|
sl@0
|
300 |
//
|
sl@0
|
301 |
// we have Borland/Intel/Microsoft __int64:
|
sl@0
|
302 |
//
|
sl@0
|
303 |
typedef __int64 intmax_t;
|
sl@0
|
304 |
typedef unsigned __int64 uintmax_t;
|
sl@0
|
305 |
typedef __int64 int64_t;
|
sl@0
|
306 |
typedef __int64 int_least64_t;
|
sl@0
|
307 |
typedef __int64 int_fast64_t;
|
sl@0
|
308 |
typedef unsigned __int64 uint64_t;
|
sl@0
|
309 |
typedef unsigned __int64 uint_least64_t;
|
sl@0
|
310 |
typedef unsigned __int64 uint_fast64_t;
|
sl@0
|
311 |
# else // assume no 64-bit integers
|
sl@0
|
312 |
# define BOOST_NO_INT64_T
|
sl@0
|
313 |
typedef int32_t intmax_t;
|
sl@0
|
314 |
typedef uint32_t uintmax_t;
|
sl@0
|
315 |
# endif
|
sl@0
|
316 |
|
sl@0
|
317 |
} // namespace boost
|
sl@0
|
318 |
|
sl@0
|
319 |
|
sl@0
|
320 |
#endif // BOOST_HAS_STDINT_H
|
sl@0
|
321 |
|
sl@0
|
322 |
#endif // BOOST_CSTDINT_HPP
|
sl@0
|
323 |
|
sl@0
|
324 |
|
sl@0
|
325 |
/****************************************************
|
sl@0
|
326 |
|
sl@0
|
327 |
Macro definition section:
|
sl@0
|
328 |
|
sl@0
|
329 |
Define various INTXX_C macros only if
|
sl@0
|
330 |
__STDC_CONSTANT_MACROS is defined.
|
sl@0
|
331 |
|
sl@0
|
332 |
Undefine the macros if __STDC_CONSTANT_MACROS is
|
sl@0
|
333 |
not defined and the macros are (cf <cassert>).
|
sl@0
|
334 |
|
sl@0
|
335 |
Added 23rd September 2000 (John Maddock).
|
sl@0
|
336 |
Modified 11th September 2001 to be excluded when
|
sl@0
|
337 |
BOOST_HAS_STDINT_H is defined (John Maddock).
|
sl@0
|
338 |
|
sl@0
|
339 |
******************************************************/
|
sl@0
|
340 |
|
sl@0
|
341 |
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(BOOST_HAS_STDINT_H)
|
sl@0
|
342 |
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
|
sl@0
|
343 |
# if defined(BOOST_HAS_MS_INT64)
|
sl@0
|
344 |
//
|
sl@0
|
345 |
// Borland/Intel/Microsoft compilers have width specific suffixes:
|
sl@0
|
346 |
//
|
sl@0
|
347 |
# define INT8_C(value) value##i8
|
sl@0
|
348 |
# define INT16_C(value) value##i16
|
sl@0
|
349 |
# define INT32_C(value) value##i32
|
sl@0
|
350 |
# define INT64_C(value) value##i64
|
sl@0
|
351 |
# ifdef __BORLANDC__
|
sl@0
|
352 |
// Borland bug: appending ui8 makes the type a signed char
|
sl@0
|
353 |
# define UINT8_C(value) static_cast<unsigned char>(value##u)
|
sl@0
|
354 |
# else
|
sl@0
|
355 |
# define UINT8_C(value) value##ui8
|
sl@0
|
356 |
# endif
|
sl@0
|
357 |
# define UINT16_C(value) value##ui16
|
sl@0
|
358 |
# define UINT32_C(value) value##ui32
|
sl@0
|
359 |
# define UINT64_C(value) value##ui64
|
sl@0
|
360 |
# define INTMAX_C(value) value##i64
|
sl@0
|
361 |
# define UINTMAX_C(value) value##ui64
|
sl@0
|
362 |
|
sl@0
|
363 |
# else
|
sl@0
|
364 |
// do it the old fashioned way:
|
sl@0
|
365 |
|
sl@0
|
366 |
// 8-bit types ------------------------------------------------------------//
|
sl@0
|
367 |
|
sl@0
|
368 |
# if UCHAR_MAX == 0xff
|
sl@0
|
369 |
# define INT8_C(value) static_cast<boost::int8_t>(value)
|
sl@0
|
370 |
# define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
|
sl@0
|
371 |
# endif
|
sl@0
|
372 |
|
sl@0
|
373 |
// 16-bit types -----------------------------------------------------------//
|
sl@0
|
374 |
|
sl@0
|
375 |
# if USHRT_MAX == 0xffff
|
sl@0
|
376 |
# define INT16_C(value) static_cast<boost::int16_t>(value)
|
sl@0
|
377 |
# define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
|
sl@0
|
378 |
# endif
|
sl@0
|
379 |
|
sl@0
|
380 |
// 32-bit types -----------------------------------------------------------//
|
sl@0
|
381 |
|
sl@0
|
382 |
# if UINT_MAX == 0xffffffff
|
sl@0
|
383 |
# define INT32_C(value) value
|
sl@0
|
384 |
# define UINT32_C(value) value##u
|
sl@0
|
385 |
# elif ULONG_MAX == 0xffffffff
|
sl@0
|
386 |
# define INT32_C(value) value##L
|
sl@0
|
387 |
# define UINT32_C(value) value##uL
|
sl@0
|
388 |
# endif
|
sl@0
|
389 |
|
sl@0
|
390 |
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
|
sl@0
|
391 |
|
sl@0
|
392 |
# if defined(BOOST_HAS_LONG_LONG) && \
|
sl@0
|
393 |
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
sl@0
|
394 |
|
sl@0
|
395 |
# if defined(__hpux)
|
sl@0
|
396 |
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
|
sl@0
|
397 |
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \
|
sl@0
|
398 |
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || \
|
sl@0
|
399 |
(defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
|
sl@0
|
400 |
|
sl@0
|
401 |
# else
|
sl@0
|
402 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
403 |
# endif
|
sl@0
|
404 |
# define INT64_C(value) value##LL
|
sl@0
|
405 |
# define UINT64_C(value) value##uLL
|
sl@0
|
406 |
# elif ULONG_MAX != 0xffffffff
|
sl@0
|
407 |
|
sl@0
|
408 |
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
|
sl@0
|
409 |
# define INT64_C(value) value##L
|
sl@0
|
410 |
# define UINT64_C(value) value##uL
|
sl@0
|
411 |
# else
|
sl@0
|
412 |
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
sl@0
|
413 |
# endif
|
sl@0
|
414 |
# endif
|
sl@0
|
415 |
|
sl@0
|
416 |
# ifdef BOOST_NO_INT64_T
|
sl@0
|
417 |
# define INTMAX_C(value) INT32_C(value)
|
sl@0
|
418 |
# define UINTMAX_C(value) UINT32_C(value)
|
sl@0
|
419 |
# else
|
sl@0
|
420 |
# define INTMAX_C(value) INT64_C(value)
|
sl@0
|
421 |
# define UINTMAX_C(value) UINT64_C(value)
|
sl@0
|
422 |
# endif
|
sl@0
|
423 |
|
sl@0
|
424 |
# endif // Borland/Microsoft specific width suffixes
|
sl@0
|
425 |
|
sl@0
|
426 |
|
sl@0
|
427 |
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_HAS_STDINT_H)
|
sl@0
|
428 |
//
|
sl@0
|
429 |
// undef all the macros:
|
sl@0
|
430 |
//
|
sl@0
|
431 |
# undef INT8_C
|
sl@0
|
432 |
# undef INT16_C
|
sl@0
|
433 |
# undef INT32_C
|
sl@0
|
434 |
# undef INT64_C
|
sl@0
|
435 |
# undef UINT8_C
|
sl@0
|
436 |
# undef UINT16_C
|
sl@0
|
437 |
# undef UINT32_C
|
sl@0
|
438 |
# undef UINT64_C
|
sl@0
|
439 |
# undef INTMAX_C
|
sl@0
|
440 |
# undef UINTMAX_C
|
sl@0
|
441 |
|
sl@0
|
442 |
#endif // __STDC_CONSTANT_MACROS_DEFINED etc.
|
sl@0
|
443 |
|
sl@0
|
444 |
|
sl@0
|
445 |
|
sl@0
|
446 |
|