1 | /*===---- inttypes.h - Standard header for integer printf macros ----------===*\ |
2 | * |
3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
4 | * of this software and associated documentation files (the "Software"), to deal |
5 | * in the Software without restriction, including without limitation the rights |
6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
7 | * copies of the Software, and to permit persons to whom the Software is |
8 | * furnished to do so, subject to the following conditions: |
9 | * |
10 | * The above copyright notice and this permission notice shall be included in |
11 | * all copies or substantial portions of the Software. |
12 | * |
13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 | * THE SOFTWARE. |
20 | * |
21 | \*===----------------------------------------------------------------------===*/ |
22 | |
23 | #ifndef __CLANG_INTTYPES_H |
24 | #define __CLANG_INTTYPES_H |
25 | |
26 | #if defined(_MSC_VER) && _MSC_VER < 1800 |
27 | #error MSVC does not have inttypes.h prior to Visual Studio 2013 |
28 | #endif |
29 | |
30 | #include_next <inttypes.h> |
31 | |
32 | #if defined(_MSC_VER) && _MSC_VER < 1900 |
33 | /* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x". |
34 | * This triggers format warnings, so fix it up here. */ |
35 | #undef PRId32 |
36 | #undef PRIdLEAST32 |
37 | #undef PRIdFAST32 |
38 | #undef PRIi32 |
39 | #undef PRIiLEAST32 |
40 | #undef PRIiFAST32 |
41 | #undef PRIo32 |
42 | #undef PRIoLEAST32 |
43 | #undef PRIoFAST32 |
44 | #undef PRIu32 |
45 | #undef PRIuLEAST32 |
46 | #undef PRIuFAST32 |
47 | #undef PRIx32 |
48 | #undef PRIxLEAST32 |
49 | #undef PRIxFAST32 |
50 | #undef PRIX32 |
51 | #undef PRIXLEAST32 |
52 | #undef PRIXFAST32 |
53 | |
54 | #undef SCNd32 |
55 | #undef SCNdLEAST32 |
56 | #undef SCNdFAST32 |
57 | #undef SCNi32 |
58 | #undef SCNiLEAST32 |
59 | #undef SCNiFAST32 |
60 | #undef SCNo32 |
61 | #undef SCNoLEAST32 |
62 | #undef SCNoFAST32 |
63 | #undef SCNu32 |
64 | #undef SCNuLEAST32 |
65 | #undef SCNuFAST32 |
66 | #undef SCNx32 |
67 | #undef SCNxLEAST32 |
68 | #undef SCNxFAST32 |
69 | |
70 | #define PRId32 "d" |
71 | #define PRIdLEAST32 "d" |
72 | #define PRIdFAST32 "d" |
73 | #define PRIi32 "i" |
74 | #define PRIiLEAST32 "i" |
75 | #define PRIiFAST32 "i" |
76 | #define PRIo32 "o" |
77 | #define PRIoLEAST32 "o" |
78 | #define PRIoFAST32 "o" |
79 | #define PRIu32 "u" |
80 | #define PRIuLEAST32 "u" |
81 | #define PRIuFAST32 "u" |
82 | #define PRIx32 "x" |
83 | #define PRIxLEAST32 "x" |
84 | #define PRIxFAST32 "x" |
85 | #define PRIX32 "X" |
86 | #define PRIXLEAST32 "X" |
87 | #define PRIXFAST32 "X" |
88 | |
89 | #define SCNd32 "d" |
90 | #define SCNdLEAST32 "d" |
91 | #define SCNdFAST32 "d" |
92 | #define SCNi32 "i" |
93 | #define SCNiLEAST32 "i" |
94 | #define SCNiFAST32 "i" |
95 | #define SCNo32 "o" |
96 | #define SCNoLEAST32 "o" |
97 | #define SCNoFAST32 "o" |
98 | #define SCNu32 "u" |
99 | #define SCNuLEAST32 "u" |
100 | #define SCNuFAST32 "u" |
101 | #define SCNx32 "x" |
102 | #define SCNxLEAST32 "x" |
103 | #define SCNxFAST32 "x" |
104 | #endif |
105 | |
106 | #endif /* __CLANG_INTTYPES_H */ |
107 | |