From: Qin Long Date: Tue, 4 Apr 2017 17:08:16 +0000 (+0800) Subject: e_os2.h: Refine OSSL_SSIZE definition under UEFI environment X-Git-Tag: OpenSSL_1_1_1-pre1~1851 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=005f6766284155645fa760cf764f85031e209f6c;p=openssl e_os2.h: Refine OSSL_SSIZE definition under UEFI environment Under UEFI build environment, we may encounter the OSSL_SSIZE macro re-definition error in e_os2.h if any module call OpenSSL API directly by including "openssl/xxxx.h" (caused by the predefined _WIN32/_WIN64 macro, which should have been un-defined under OPENSSL_SYS_UEFI). Though it's not one recommended usage, this patch could still eliminate the possible build issue by refining the OSSL_SSIZE definition under OPENSSL_SYS_UEFI. Reviewed-by: Rich Salz Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3121) --- diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index 717cadf43c..746dd8fa66 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -206,9 +206,9 @@ extern "C" { # endif # endif -# if defined(OPENSSL_SYS_UEFI) && !defined(ssize_t) -# define ossl_ssize_t int -# define OSSL_SSIZE_MAX INT_MAX +# if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t) +# define ossl_ssize_t INTN +# define OSSL_SSIZE_MAX MAX_INTN # endif # ifndef ossl_ssize_t