From b775e316fa9c07c37bf0b7b5c7f959c9aa770f23 Mon Sep 17 00:00:00 2001 From: Anderson Toshiyuki Sasaki Date: Fri, 14 Jun 2019 13:50:37 +0200 Subject: priv.h: Add macro definitions for PRIx32 and PRIx64 Signed-off-by: Anderson Toshiyuki Sasaki Reviewed-by: Andreas Schneider --- include/libssh/priv.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 7dcbcd49..2a1ddb44 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -82,6 +82,18 @@ char *strndup(const char *s, size_t n); # define PRIu32 "u" # endif /* PRIu32 */ +# ifndef PRIx64 +# if __WORDSIZE == 64 +# define PRIx64 "lx" +# else +# define PRIx64 "llx" +# endif /* __WORDSIZE */ +# endif /* PRIx64 */ + +# ifndef PRIx32 +# define PRIx32 "x" +# endif /* PRIx32 */ + # ifdef _MSC_VER # include # include /* va_copy define check */ -- cgit v1.2.3