1 /*===---- inttypes.h - Standard header for integer printf macros ----------===*\
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 \*===----------------------------------------------------------------------===*/
9 #ifndef __CLANG_INTTYPES_H
10 // AIX system headers need inttypes.h to be re-enterable while _STD_TYPES_T
11 // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
12 // case the header guard macro is defined.
13 #if !defined(_AIX) || !defined(_STD_TYPES_T)
14 #define __CLANG_INTTYPES_H
17 #if defined(_MSC_VER) && _MSC_VER < 1800
18 #error MSVC does not have inttypes.h prior to Visual Studio 2013
21 #include_next <inttypes.h>
23 #if defined(_MSC_VER) && _MSC_VER < 1900
24 /* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
25 * This triggers format warnings, so fix it up here. */
62 #define PRIdLEAST32 "d"
63 #define PRIdFAST32 "d"
65 #define PRIiLEAST32 "i"
66 #define PRIiFAST32 "i"
68 #define PRIoLEAST32 "o"
69 #define PRIoFAST32 "o"
71 #define PRIuLEAST32 "u"
72 #define PRIuFAST32 "u"
74 #define PRIxLEAST32 "x"
75 #define PRIxFAST32 "x"
77 #define PRIXLEAST32 "X"
78 #define PRIXFAST32 "X"
81 #define SCNdLEAST32 "d"
82 #define SCNdFAST32 "d"
84 #define SCNiLEAST32 "i"
85 #define SCNiFAST32 "i"
87 #define SCNoLEAST32 "o"
88 #define SCNoFAST32 "o"
90 #define SCNuLEAST32 "u"
91 #define SCNuFAST32 "u"
93 #define SCNxLEAST32 "x"
94 #define SCNxFAST32 "x"
97 #endif /* __CLANG_INTTYPES_H */