author | Augie Fackler <augie@google.com> |
Mon, 14 Mar 2016 21:15:59 -0400 | |
changeset 28529 | 045cdf47851a |
parent 28528 | a011080fdb7b |
permissions | -rw-r--r-- |
28529
045cdf47851a
fsmonitor: flag msc_stdint as no-check-code
Augie Fackler <augie@google.com>
parents:
28528
diff
changeset
|
1 |
// no-check-code |
28528
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
2 |
// ISO C9x compliant stdint.h for Microsoft Visual Studio |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
3 |
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
4 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
5 |
// Copyright (c) 2006-2013 Alexander Chemeris |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
6 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
7 |
// Redistribution and use in source and binary forms, with or without |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
8 |
// modification, are permitted provided that the following conditions are met: |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
9 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
10 |
// 1. Redistributions of source code must retain the above copyright notice, |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
11 |
// this list of conditions and the following disclaimer. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
12 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
13 |
// 2. Redistributions in binary form must reproduce the above copyright |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
14 |
// notice, this list of conditions and the following disclaimer in the |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
15 |
// documentation and/or other materials provided with the distribution. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
16 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
17 |
// 3. Neither the name of the product nor the names of its contributors may |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
18 |
// be used to endorse or promote products derived from this software |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
19 |
// without specific prior written permission. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
20 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
21 |
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
22 |
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
23 |
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
24 |
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
25 |
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
26 |
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
27 |
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
28 |
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
29 |
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
30 |
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
31 |
// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
32 |
/////////////////////////////////////////////////////////////////////////////// |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
33 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
34 |
#ifndef _MSC_VER // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
35 |
#error "Use this header only with Microsoft Visual C++ compilers!" |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
36 |
#endif // _MSC_VER ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
37 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
38 |
#ifndef _MSC_STDINT_H_ // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
39 |
#define _MSC_STDINT_H_ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
40 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
41 |
#if _MSC_VER > 1000 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
42 |
#pragma once |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
43 |
#endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
44 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
45 |
#if _MSC_VER >= 1600 // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
46 |
#include <stdint.h> |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
47 |
#else // ] _MSC_VER >= 1600 [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
48 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
49 |
#include <limits.h> |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
50 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
51 |
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
52 |
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}' |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
53 |
// or compiler give many errors like this: |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
54 |
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
55 |
#ifdef __cplusplus |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
56 |
extern "C" { |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
57 |
#endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
58 |
# include <wchar.h> |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
59 |
#ifdef __cplusplus |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
60 |
} |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
61 |
#endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
62 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
63 |
// Define _W64 macros to mark types changing their size, like intptr_t. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
64 |
#ifndef _W64 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
65 |
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
66 |
# define _W64 __w64 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
67 |
# else |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
68 |
# define _W64 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
69 |
# endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
70 |
#endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
71 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
72 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
73 |
// 7.18.1 Integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
74 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
75 |
// 7.18.1.1 Exact-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
76 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
77 |
// Visual Studio 6 and Embedded Visual C++ 4 doesn't |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
78 |
// realize that, e.g. char has the same size as __int8 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
79 |
// so we give up on __intX for them. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
80 |
#if (_MSC_VER < 1300) |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
81 |
typedef signed char int8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
82 |
typedef signed short int16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
83 |
typedef signed int int32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
84 |
typedef unsigned char uint8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
85 |
typedef unsigned short uint16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
86 |
typedef unsigned int uint32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
87 |
#else |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
88 |
typedef signed __int8 int8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
89 |
typedef signed __int16 int16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
90 |
typedef signed __int32 int32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
91 |
typedef unsigned __int8 uint8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
92 |
typedef unsigned __int16 uint16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
93 |
typedef unsigned __int32 uint32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
94 |
#endif |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
95 |
typedef signed __int64 int64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
96 |
typedef unsigned __int64 uint64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
97 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
98 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
99 |
// 7.18.1.2 Minimum-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
100 |
typedef int8_t int_least8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
101 |
typedef int16_t int_least16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
102 |
typedef int32_t int_least32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
103 |
typedef int64_t int_least64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
104 |
typedef uint8_t uint_least8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
105 |
typedef uint16_t uint_least16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
106 |
typedef uint32_t uint_least32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
107 |
typedef uint64_t uint_least64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
108 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
109 |
// 7.18.1.3 Fastest minimum-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
110 |
typedef int8_t int_fast8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
111 |
typedef int16_t int_fast16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
112 |
typedef int32_t int_fast32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
113 |
typedef int64_t int_fast64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
114 |
typedef uint8_t uint_fast8_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
115 |
typedef uint16_t uint_fast16_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
116 |
typedef uint32_t uint_fast32_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
117 |
typedef uint64_t uint_fast64_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
118 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
119 |
// 7.18.1.4 Integer types capable of holding object pointers |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
120 |
#ifdef _WIN64 // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
121 |
typedef signed __int64 intptr_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
122 |
typedef unsigned __int64 uintptr_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
123 |
#else // _WIN64 ][ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
124 |
typedef _W64 signed int intptr_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
125 |
typedef _W64 unsigned int uintptr_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
126 |
#endif // _WIN64 ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
127 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
128 |
// 7.18.1.5 Greatest-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
129 |
typedef int64_t intmax_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
130 |
typedef uint64_t uintmax_t; |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
131 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
132 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
133 |
// 7.18.2 Limits of specified-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
134 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
135 |
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
136 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
137 |
// 7.18.2.1 Limits of exact-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
138 |
#define INT8_MIN ((int8_t)_I8_MIN) |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
139 |
#define INT8_MAX _I8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
140 |
#define INT16_MIN ((int16_t)_I16_MIN) |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
141 |
#define INT16_MAX _I16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
142 |
#define INT32_MIN ((int32_t)_I32_MIN) |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
143 |
#define INT32_MAX _I32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
144 |
#define INT64_MIN ((int64_t)_I64_MIN) |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
145 |
#define INT64_MAX _I64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
146 |
#define UINT8_MAX _UI8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
147 |
#define UINT16_MAX _UI16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
148 |
#define UINT32_MAX _UI32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
149 |
#define UINT64_MAX _UI64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
150 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
151 |
// 7.18.2.2 Limits of minimum-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
152 |
#define INT_LEAST8_MIN INT8_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
153 |
#define INT_LEAST8_MAX INT8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
154 |
#define INT_LEAST16_MIN INT16_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
155 |
#define INT_LEAST16_MAX INT16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
156 |
#define INT_LEAST32_MIN INT32_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
157 |
#define INT_LEAST32_MAX INT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
158 |
#define INT_LEAST64_MIN INT64_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
159 |
#define INT_LEAST64_MAX INT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
160 |
#define UINT_LEAST8_MAX UINT8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
161 |
#define UINT_LEAST16_MAX UINT16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
162 |
#define UINT_LEAST32_MAX UINT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
163 |
#define UINT_LEAST64_MAX UINT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
164 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
165 |
// 7.18.2.3 Limits of fastest minimum-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
166 |
#define INT_FAST8_MIN INT8_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
167 |
#define INT_FAST8_MAX INT8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
168 |
#define INT_FAST16_MIN INT16_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
169 |
#define INT_FAST16_MAX INT16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
170 |
#define INT_FAST32_MIN INT32_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
171 |
#define INT_FAST32_MAX INT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
172 |
#define INT_FAST64_MIN INT64_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
173 |
#define INT_FAST64_MAX INT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
174 |
#define UINT_FAST8_MAX UINT8_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
175 |
#define UINT_FAST16_MAX UINT16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
176 |
#define UINT_FAST32_MAX UINT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
177 |
#define UINT_FAST64_MAX UINT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
178 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
179 |
// 7.18.2.4 Limits of integer types capable of holding object pointers |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
180 |
#ifdef _WIN64 // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
181 |
# define INTPTR_MIN INT64_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
182 |
# define INTPTR_MAX INT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
183 |
# define UINTPTR_MAX UINT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
184 |
#else // _WIN64 ][ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
185 |
# define INTPTR_MIN INT32_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
186 |
# define INTPTR_MAX INT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
187 |
# define UINTPTR_MAX UINT32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
188 |
#endif // _WIN64 ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
189 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
190 |
// 7.18.2.5 Limits of greatest-width integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
191 |
#define INTMAX_MIN INT64_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
192 |
#define INTMAX_MAX INT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
193 |
#define UINTMAX_MAX UINT64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
194 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
195 |
// 7.18.3 Limits of other integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
196 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
197 |
#ifdef _WIN64 // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
198 |
# define PTRDIFF_MIN _I64_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
199 |
# define PTRDIFF_MAX _I64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
200 |
#else // _WIN64 ][ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
201 |
# define PTRDIFF_MIN _I32_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
202 |
# define PTRDIFF_MAX _I32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
203 |
#endif // _WIN64 ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
204 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
205 |
#define SIG_ATOMIC_MIN INT_MIN |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
206 |
#define SIG_ATOMIC_MAX INT_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
207 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
208 |
#ifndef SIZE_MAX // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
209 |
# ifdef _WIN64 // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
210 |
# define SIZE_MAX _UI64_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
211 |
# else // _WIN64 ][ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
212 |
# define SIZE_MAX _UI32_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
213 |
# endif // _WIN64 ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
214 |
#endif // SIZE_MAX ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
215 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
216 |
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h> |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
217 |
#ifndef WCHAR_MIN // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
218 |
# define WCHAR_MIN 0 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
219 |
#endif // WCHAR_MIN ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
220 |
#ifndef WCHAR_MAX // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
221 |
# define WCHAR_MAX _UI16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
222 |
#endif // WCHAR_MAX ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
223 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
224 |
#define WINT_MIN 0 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
225 |
#define WINT_MAX _UI16_MAX |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
226 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
227 |
#endif // __STDC_LIMIT_MACROS ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
228 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
229 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
230 |
// 7.18.4 Limits of other integer types |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
231 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
232 |
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
233 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
234 |
// 7.18.4.1 Macros for minimum-width integer constants |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
235 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
236 |
#define INT8_C(val) val##i8 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
237 |
#define INT16_C(val) val##i16 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
238 |
#define INT32_C(val) val##i32 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
239 |
#define INT64_C(val) val##i64 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
240 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
241 |
#define UINT8_C(val) val##ui8 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
242 |
#define UINT16_C(val) val##ui16 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
243 |
#define UINT32_C(val) val##ui32 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
244 |
#define UINT64_C(val) val##ui64 |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
245 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
246 |
// 7.18.4.2 Macros for greatest-width integer constants |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
247 |
// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
248 |
// Check out Issue 9 for the details. |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
249 |
#ifndef INTMAX_C // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
250 |
# define INTMAX_C INT64_C |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
251 |
#endif // INTMAX_C ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
252 |
#ifndef UINTMAX_C // [ |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
253 |
# define UINTMAX_C UINT64_C |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
254 |
#endif // UINTMAX_C ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
255 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
256 |
#endif // __STDC_CONSTANT_MACROS ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
257 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
258 |
#endif // _MSC_VER >= 1600 ] |
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
259 |
|
a011080fdb7b
fsmonitor: use custom stdint.h file when compiling with Visual C
Sune Foldager <sune.foldager@me.com>
parents:
diff
changeset
|
260 |
#endif // _MSC_STDINT_H_ ] |