1 /*===---- inttypes.h - Standard header for integer printf macros ----------===*\
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:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
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
21 \*===----------------------------------------------------------------------===*/
23 #ifndef __CLANG_INTTYPES_H
24 #define __CLANG_INTTYPES_H
26 #if defined(_MSC_VER) && _MSC_VER < 1800
27 #error MSVC does not have inttypes.h prior to Visual Studio 2013
30 #include_next <inttypes.h>
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. */
71 #define PRIdLEAST32 "d"
72 #define PRIdFAST32 "d"
74 #define PRIiLEAST32 "i"
75 #define PRIiFAST32 "i"
77 #define PRIoLEAST32 "o"
78 #define PRIoFAST32 "o"
80 #define PRIuLEAST32 "u"
81 #define PRIuFAST32 "u"
83 #define PRIxLEAST32 "x"
84 #define PRIxFAST32 "x"
86 #define PRIXLEAST32 "X"
87 #define PRIXFAST32 "X"
90 #define SCNdLEAST32 "d"
91 #define SCNdFAST32 "d"
93 #define SCNiLEAST32 "i"
94 #define SCNiFAST32 "i"
96 #define SCNoLEAST32 "o"
97 #define SCNoFAST32 "o"
99 #define SCNuLEAST32 "u"
100 #define SCNuFAST32 "u"
102 #define SCNxLEAST32 "x"
103 #define SCNxFAST32 "x"
106 #endif /* __CLANG_INTTYPES_H */