From a4cc41d4d0ef42915694e10cd819462523b92a3b Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 16 Apr 2013 10:56:29 +0200 Subject: lib/replace: add SCNx macros we already have PRI*, but the corresponding SCN* were missing Signed-off-by: Christian Ambach Reviewed-by: Michael Adam --- lib/replace/replace.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'lib/replace') diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 2262a8bd38..c0b799763a 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -108,6 +108,45 @@ # define PRIu64 __PRI64_PREFIX "u" #endif +#ifndef SCNd8 +# define SCNd8 "hhd" +#endif +#ifndef SCNd16 +# define SCNd16 "hd" +#endif +#ifndef SCNd32 +# define SCNd32 "d" +#endif +#ifndef SCNd64 +# define SCNd64 __PRI64_PREFIX "d" +#endif + +#ifndef SCNi8 +# define SCNi8 "hhi" +#endif +#ifndef SCNi16 +# define SCNi16 "hi" +#endif +#ifndef SCNi32 +# define SCNi32 "i" +#endif +#ifndef SCNi64 +# define SCNi64 __PRI64_PREFIX "i" +#endif + +#ifndef SCNu8 +# define SCNu8 "hhu" +#endif +#ifndef SCNu16 +# define SCNu16 "hu" +#endif +#ifndef SCNu32 +# define SCNu32 "u" +#endif +#ifndef SCNu64 +# define SCNu64 __PRI64_PREFIX "u" +#endif + #ifdef HAVE_BSD_STRING_H #include #endif -- cgit