Commit cbb259ca authored by David Woodhouse's avatar David Woodhouse Committed by Rich Salz
Browse files

RT4334: Check UEFI before __STDC_VERSION__ for <inttypes.h>



Adding -nostdinc to the EDK2 showed that we were including <inttypes.h>
for some UEFI builds, because the check for __STDC_VERSION__ happens
before the check for OPENSSL_SYS_UEFI. Fix that.

Signed-off-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 316fae2a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -286,11 +286,7 @@ extern "C" {
# endif

/* Standard integer types */
# if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
     defined(__osf__) || defined(__sgi) || defined(__hpux) || \
     defined(OPENSSL_SYS_VMS)
#  include <inttypes.h>
# elif defined(OPENSSL_SYS_UEFI)
# if defined(OPENSSL_SYS_UEFI)
typedef INT8 int8_t;
typedef UINT8 uint8_t;
typedef INT16 int16_t;
@@ -300,6 +296,10 @@ typedef UINT32 uint32_t;
typedef INT64 int64_t;
typedef UINT64 uint64_t;
#  define PRIu64 "%Lu"
# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
     defined(__osf__) || defined(__sgi) || defined(__hpux) || \
     defined(OPENSSL_SYS_VMS)
#  include <inttypes.h>
# elif defined(_MSC_VER) && _MSC_VER<=1500
/*
 * minimally required typdefs for systems not supporting inttypes.h or