From 875e3f934e8586039e79efb6ed1262c80803aa42 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 25 Oct 2016 15:28:30 +0100 Subject: [PATCH] Provide a cross-platform format specifier (OSSLzu) for printing size_t Reviewed-by: Richard Levitte --- include/openssl/e_os2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index 99ea3477d7..5bec684dca 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -276,6 +276,17 @@ typedef unsigned __int64 uint64_t; # endif # endif +/* Format specifier for printing size_t */ +# if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) +# define OSSLzu "zu" +# else +# ifdef THIRTY_TWO_BIT +# define OSSLzu "u" +# else +# define OSSLzu PRIu64 +# endif +# endif + /* ossl_inline: portable inline definition usable in public headers */ # if !defined(inline) && !defined(__cplusplus) # if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L -- 2.34.1