Use e_os2.h rather than opensslconf.h, since some needed macros are
defined there.
diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c
index b289c97..13fb517 100644
--- a/crypto/bio/bss_log.c
+++ b/crypto/bio/bss_log.c
@@ -66,7 +66,7 @@
 #include <stdio.h>
 #include <errno.h>
 
-#include <openssl/opensslconf.h>
+#include <openssl/e_os2.h>
 
 #if defined(OPENSSL_SYS_WIN32)
 #  include <process.h>
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h
index 218907b..22e8c2d 100644
--- a/crypto/bn/bn.h
+++ b/crypto/bn/bn.h
@@ -59,10 +59,10 @@
 #ifndef HEADER_BN_H
 #define HEADER_BN_H
 
+#include <openssl/e_os2.h>
 #ifndef OPENSSL_NO_FP_API
 #include <stdio.h> /* FILE */
 #endif
-#include <openssl/opensslconf.h>
 
 #ifdef  __cplusplus
 extern "C" {
diff --git a/crypto/des/des_locl.h b/crypto/des/des_locl.h
index 5a9ba36..8c49894 100644
--- a/crypto/des/des_locl.h
+++ b/crypto/des/des_locl.h
@@ -59,6 +59,8 @@
 #ifndef HEADER_DES_LOCL_H
 #define HEADER_DES_LOCL_H
 
+#include <openssl/e_os2.h>
+
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
 #ifndef OPENSSL_SYS_MSDOS
 #define OPENSSL_SYS_MSDOS
@@ -68,8 +70,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <openssl/opensslconf.h>
-
 #ifndef OPENSSL_SYS_MSDOS
 #if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
 #ifdef OPENSSL_UNISTD
diff --git a/crypto/des/destest.c b/crypto/des/destest.c
index 6f60e08..1be401f 100644
--- a/crypto/des/destest.c
+++ b/crypto/des/destest.c
@@ -56,15 +56,16 @@
  * [including the GNU Public Licence.]
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <openssl/e_os2.h>
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_WINDOWS)
 #ifndef OPENSSL_SYS_MSDOS
 #define OPENSSL_SYS_MSDOS
 #endif
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/opensslconf.h>
 #ifndef OPENSSL_SYS_MSDOS
 #if !defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_VMS_DECC)
 #include OPENSSL_UNISTD
diff --git a/crypto/des/read_pwd.c b/crypto/des/read_pwd.c
index 542df5b..db021df 100644
--- a/crypto/des/read_pwd.c
+++ b/crypto/des/read_pwd.c
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#include <openssl/opensslconf.h>
+#include <openssl/e_os2.h>
 #if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WIN32)
 #ifdef OPENSSL_UNISTD
 # include OPENSSL_UNISTD