From 92bec78a26139185c840a5d516a2aa171b20e269 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Tue, 11 Jun 2019 18:16:51 +1000 Subject: [PATCH] Add defines to indicate if intypes.h and stdint.h are unavailable Use the defines OPENSSL_NO_INTTYPES_H & OPENSSL_NO_STDINT_H to determine if the headers are unavailable for a platform. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8986) --- include/openssl/e_os2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index b88abc1791..50ce937fd1 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -228,6 +228,8 @@ extern "C" { # endif /* Standard integer types */ +# define OPENSSL_NO_INTTYPES_H +# define OPENSSL_NO_STDINT_H # if defined(OPENSSL_SYS_UEFI) typedef INT8 int8_t; typedef UINT8 uint8_t; @@ -241,6 +243,9 @@ typedef UINT64 uint64_t; defined(__osf__) || defined(__sgi) || defined(__hpux) || \ defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) # include +# undef OPENSSL_NO_INTTYPES_H +/* Because the specs say that inttypes.h includes stdint.h if present */ +# undef OPENSSL_NO_STDINT_H # elif defined(_MSC_VER) && _MSC_VER<=1500 /* * minimally required typdefs for systems not supporting inttypes.h or @@ -256,6 +261,7 @@ typedef __int64 int64_t; typedef unsigned __int64 uint64_t; # else # include +# undef OPENSSL_NO_STDINT_H # endif /* ossl_inline: portable inline definition usable in public headers */ -- 2.25.1