Fill in missing PRI* macros for inttypes.h.

inttypes.h is supposed to define print macros for the various integers
defined in stdint.h. This change fills in the sized macros for all the
various suffixes. The 'o' suffixed variants are omitted because, at a
glance, lib/libc/printf.c does not support it.

Note to reviewers, these should be checked against the typedefs in
stdint.h and the prefixes defined for this libc's printf implementing.

Change-Id: I71a9425854f05a2c189389dea53a5748d3c1dd2d
This commit is contained in:
David Benjamin
2016-08-17 02:00:21 -04:00
committed by Travis Geiselbrecht
parent 54786a2d09
commit 13d4161b45

View File

@@ -23,8 +23,29 @@
#ifndef __INTTYPES_H
#define __INTTYPES_H
#define PRId8 "hhd"
#define PRIi8 "hhi"
#define PRIu8 "hhu"
#define PRIx8 "hhx"
#define PRIX8 "hhX"
#define PRId16 "hd"
#define PRIi16 "hi"
#define PRIu16 "hu"
#define PRIx16 "hx"
#define PRIX16 "hX"
#define PRId32 "d"
#define PRIi32 "i"
#define PRIu32 "u"
#define PRIx32 "x"
#define PRIX32 "X"
#define PRId64 "lld"
#define PRIi64 "lli"
#define PRIu64 "llu"
#define PRIx64 "llx"
#define PRIX64 "llX"
#include <stdint.h>