Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Jacob Garber | 3a32380 | 2019-08-07 19:10:52 -0600 | [diff] [blame] | 3 | |
Aaron Durbin | d466d75 | 2013-03-19 12:41:29 -0500 | [diff] [blame] | 4 | #ifndef INTTYPES_H |
| 5 | #define INTTYPES_H |
Jacob Garber | 3a32380 | 2019-08-07 19:10:52 -0600 | [diff] [blame] | 6 | |
Aaron Durbin | d466d75 | 2013-03-19 12:41:29 -0500 | [diff] [blame] | 7 | #include <stdint.h> |
Jacob Garber | 3a32380 | 2019-08-07 19:10:52 -0600 | [diff] [blame] | 8 | |
| 9 | /* int8_t and uint8_t */ |
| 10 | #define PRId8 "d" |
| 11 | #define PRIi8 "i" |
| 12 | #define PRIu8 "u" |
| 13 | #define PRIo8 "o" |
| 14 | #define PRIx8 "x" |
| 15 | #define PRIX8 "X" |
| 16 | |
| 17 | /* int16_t and uint16_t */ |
| 18 | #define PRId16 "d" |
| 19 | #define PRIi16 "i" |
| 20 | #define PRIu16 "u" |
| 21 | #define PRIo16 "o" |
| 22 | #define PRIx16 "x" |
| 23 | #define PRIX16 "X" |
| 24 | |
| 25 | /* int32_t and uint32_t */ |
| 26 | #define PRId32 "d" |
| 27 | #define PRIi32 "i" |
| 28 | #define PRIu32 "u" |
| 29 | #define PRIo32 "o" |
| 30 | #define PRIx32 "x" |
| 31 | #define PRIX32 "X" |
| 32 | |
| 33 | /* int64_t and uint64_t */ |
| 34 | #define PRId64 "lld" |
| 35 | #define PRIi64 "lli" |
| 36 | #define PRIu64 "llu" |
| 37 | #define PRIo64 "llo" |
| 38 | #define PRIx64 "llx" |
| 39 | #define PRIX64 "llX" |
| 40 | |
| 41 | /* intptr_t and uintptr_t */ |
| 42 | #define PRIdPTR "ld" |
| 43 | #define PRIiPTR "li" |
| 44 | #define PRIuPTR "lu" |
| 45 | #define PRIoPTR "lo" |
| 46 | #define PRIxPTR "lx" |
| 47 | #define PRIXPTR "lX" |
| 48 | |
| 49 | /* intmax_t and uintmax_t */ |
| 50 | #define PRIdMAX "jd" |
| 51 | #define PRIiMAX "ji" |
| 52 | #define PRIuMAX "ju" |
| 53 | #define PRIoMAX "jo" |
| 54 | #define PRIxMAX "jx" |
| 55 | #define PRIXMAX "jX" |
| 56 | |
Aaron Durbin | d466d75 | 2013-03-19 12:41:29 -0500 | [diff] [blame] | 57 | #endif /* INTTYPES_H */ |