Index: sys/arch/riscv/include/int_fmtio.h =================================================================== RCS file: /cvsroot/src/sys/arch/riscv/include/int_fmtio.h,v retrieving revision 1.3 diff -p -u -r1.3 int_fmtio.h --- sys/arch/riscv/include/int_fmtio.h 16 Apr 2019 07:08:52 -0000 1.3 +++ sys/arch/riscv/include/int_fmtio.h 17 Apr 2019 09:40:22 -0000 @@ -170,8 +170,8 @@ #else #define PRIxLEAST64 "llx" /* uint_least64_t */ #endif -#define PRIxFAST8 "x" /* uint_fast8_t */ -#define PRIxFAST16 "x" /* uint_fast16_t */ +#define PRIxFAST8 "hhx" /* uint_fast8_t */ +#define PRIxFAST16 "hx" /* uint_fast16_t */ #define PRIxFAST32 "x" /* uint_fast32_t */ #ifdef _LP64 #define PRIxFAST64 "lx" /* uint_fast64_t */ @@ -198,8 +198,8 @@ #else #define PRIXLEAST64 "llX" /* uint_least64_t */ #endif -#define PRIXFAST8 "X" /* uint_fast8_t */ -#define PRIXFAST16 "X" /* uint_fast16_t */ +#define PRIXFAST8 "hhX" /* uint_fast8_t */ +#define PRIXFAST16 "hX" /* uint_fast16_t */ #define PRIXFAST32 "X" /* uint_fast32_t */ #ifdef _LP64 #define PRIXFAST64 "lX" /* uint_fast64_t */ @@ -228,8 +228,8 @@ #else #define SCNdLEAST64 "lld" /* int_least64_t */ #endif -#define SCNdFAST8 "d" /* int_fast8_t */ -#define SCNdFAST16 "d" /* int_fast16_t */ +#define SCNdFAST8 "hhd" /* int_fast8_t */ +#define SCNdFAST16 "hd" /* int_fast16_t */ #define SCNdFAST32 "d" /* int_fast32_t */ #ifdef _LP64 #define SCNdFAST64 "ld" /* int_fast64_t */ @@ -256,8 +256,8 @@ #else #define SCNiLEAST64 "lli" /* int_least64_t */ #endif -#define SCNiFAST8 "i" /* int_fast8_t */ -#define SCNiFAST16 "i" /* int_fast16_t */ +#define SCNiFAST8 "hhi" /* int_fast8_t */ +#define SCNiFAST16 "hi" /* int_fast16_t */ #define SCNiFAST32 "i" /* int_fast32_t */ #ifdef _LP64 #define SCNiFAST64 "li" /* int_fast64_t */ @@ -286,8 +286,8 @@ #else #define SCNoLEAST64 "llo" /* uint_least64_t */ #endif -#define SCNoFAST8 "o" /* uint_fast8_t */ -#define SCNoFAST16 "o" /* uint_fast16_t */ +#define SCNoFAST8 "hho" /* uint_fast8_t */ +#define SCNoFAST16 "ho" /* uint_fast16_t */ #define SCNoFAST32 "o" /* uint_fast32_t */ #ifdef _LP64 #define SCNoFAST64 "lo" /* uint_fast64_t */ @@ -314,8 +314,8 @@ #else #define SCNuLEAST64 "llu" /* uint_least64_t */ #endif -#define SCNuFAST8 "u" /* uint_fast8_t */ -#define SCNuFAST16 "u" /* uint_fast16_t */ +#define SCNuFAST8 "hhu" /* uint_fast8_t */ +#define SCNuFAST16 "hu" /* uint_fast16_t */ #define SCNuFAST32 "u" /* uint_fast32_t */ #ifdef _LP64 #define SCNuFAST64 "lu" /* uint_fast64_t */ @@ -342,8 +342,8 @@ #else #define SCNxLEAST64 "llx" /* uint_least64_t */ #endif -#define SCNxFAST8 "x" /* uint_fast8_t */ -#define SCNxFAST16 "x" /* uint_fast16_t */ +#define SCNxFAST8 "hhx" /* uint_fast8_t */ +#define SCNxFAST16 "hx" /* uint_fast16_t */ #define SCNxFAST32 "x" /* uint_fast32_t */ #ifdef _LP64 #define SCNxFAST64 "lx" /* uint_fast64_t */