diff U3 crypto/opensslconf.h crypto/opensslconf.h\r
--- crypto/opensslconf.h Thu Jun 11 21:55:38 2015\r
+++ crypto/opensslconf.h Fri Jun 12 10:28:27 2015\r
-@@ -159,9 +159,12 @@\r
- /* Should we define BN_DIV2W here? */\r
- \r
- /* Only one for the following should be defined */\r
-+/* Bypass the following definitions for UEFI version. */\r
-+#if !defined(OPENSSL_SYS_UEFI)\r
- #undef SIXTY_FOUR_BIT_LONG\r
- #undef SIXTY_FOUR_BIT\r
- #define THIRTY_TWO_BIT\r
+@@ -5,6 +5,9 @@\r
+ extern "C" {\r
+ #endif\r
+ /* OpenSSL was configured with the following options: */\r
++#ifndef OPENSSL_SYSNAME_UEFI\r
++# define OPENSSL_SYSNAME_UEFI\r
+#endif\r
+ #ifndef OPENSSL_DOING_MAKEDEPEND\r
+ \r
+ \r
+@@ -152,7 +155,7 @@\r
#endif\r
+ #endif\r
+ \r
+-#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)\r
++#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) && !defined(OPENSSL_SYSNAME_UEFI)\r
+ #define CONFIG_HEADER_BN_H\r
+ #undef BN_LLONG\r
\r
- #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)\r
+diff U3 e_os.h e_os.h\r
+--- e_os.h Thu Jul 09 19:57:16 2015\r
++++ e_os.h Thu Oct 29 16:54:10 2015\r
+@@ -136,7 +136,7 @@\r
+ # define MSDOS\r
+ # endif\r
+ \r
+-# if defined(MSDOS) && !defined(GETPID_IS_MEANINGLESS)\r
++# if (defined(MSDOS) || defined(OPENSSL_SYS_UEFI)) && !defined(GETPID_IS_MEANINGLESS)\r
+ # define GETPID_IS_MEANINGLESS\r
+ # endif\r
+ \r
+diff U3 e_os2.h e_os2.h\r
+--- e_os2.h Thu Jul 09 19:57:16 2015\r
++++ e_os2.h Thu Oct 29 15:08:19 2015\r
+@@ -97,7 +97,14 @@\r
+ * For 32 bit environment, there seems to be the CygWin environment and then\r
+ * all the others that try to do the same thing Microsoft does...\r
+ */\r
+-# if defined(OPENSSL_SYSNAME_UWIN)\r
++/*\r
++ * UEFI lives here because it might be built with a Microsoft toolchain and\r
++ * we need to avoid the false positive match on Windows.\r
++ */\r
++# if defined(OPENSSL_SYSNAME_UEFI)\r
++# undef OPENSSL_SYS_UNIX\r
++# define OPENSSL_SYS_UEFI\r
++# elif defined(OPENSSL_SYSNAME_UWIN)\r
+ # undef OPENSSL_SYS_UNIX\r
+ # define OPENSSL_SYS_WIN32_UWIN\r
+ # else\r