[openssl-dev] [openssl.org #4334] Check for UEFI before __STDC_VERSION__ for <inttypes.h>

David Woodhouse via RT rt at openssl.org
Mon Feb 22 16:58:40 UTC 2016


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.
---
 include/openssl/e_os2.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index b66b1cc..ba3345a 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -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;
@@ -299,7 +295,11 @@ typedef INT32 int32_t;
 typedef UINT32 uint32_t;
 typedef INT64 int64_t;
 typedef UINT64 uint64_t;
-#define PRIu64 "%Lu"
+#  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
-- 
2.5.0

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4334
Please log in as guest with password guest if prompted

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160222/66be3858/attachment.bin>


More information about the openssl-dev mailing list