Add the possibility to have AES removed in Windows as well.
[openssl.git] / e_os2.h
diff --git a/e_os2.h b/e_os2.h
index f279fa1d931b54ee5213e4fc860a39b568fbd107..1b71fba7077592b7f4809dce0e28b32b816a29ad 100644 (file)
--- a/e_os2.h
+++ b/e_os2.h
@@ -113,6 +113,21 @@ extern "C" {
 # endif
 #endif
 
 # endif
 #endif
 
+/* DLL settings.  This part is a bit tough, because it's up to the application
+   implementor how he or she will link the application, so it requires some
+   macro to be used. */
+#ifdef OPENSSL_SYS_WINDOWS
+# ifndef OPENSSL_OPT_WINDLL
+#  if defined(_WINDLL) /* This is used when building OpenSSL to indicate that
+                          DLL linkage should be used */
+#   define OPENSSL_OPT_WINDLL
+#  elif defined(_DLL) /* This one is used quite much in the VC++ header
+                         files */
+#   define OPENSSL_OPT_WINDLL
+#  endif
+# endif
+#endif
+
 /* -------------------------------- OpenVMS -------------------------------- */
 #if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS)
 # undef OPENSSL_SYS_UNIX
 /* -------------------------------- OpenVMS -------------------------------- */
 #if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS)
 # undef OPENSSL_SYS_UNIX
@@ -126,7 +141,7 @@ extern "C" {
 
 /* --------------------------------- Unix ---------------------------------- */
 #ifdef OPENSSL_SYS_UNIX
 
 /* --------------------------------- Unix ---------------------------------- */
 #ifdef OPENSSL_SYS_UNIX
-# if defined(linus) || defined(OPENSSL_SYSNAME_LINUX)
+# if defined(linux) || defined(OPENSSL_SYSNAME_LINUX)
 #  define OPENSSL_SYS_LINUX
 # endif
 # ifdef OPENSSL_SYSNAME_MPE
 #  define OPENSSL_SYS_LINUX
 # endif
 # ifdef OPENSSL_SYSNAME_MPE
@@ -189,7 +204,7 @@ extern "C" {
 # define OPENSSL_EXPORT globalref
 # define OPENSSL_IMPORT globalref
 # define OPENSSL_GLOBAL globaldef
 # define OPENSSL_EXPORT globalref
 # define OPENSSL_IMPORT globalref
 # define OPENSSL_GLOBAL globaldef
-#elif defined(OPENSSL_SYS_WINDOWS)
+#elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL)
 # define OPENSSL_EXPORT extern _declspec(dllexport)
 # define OPENSSL_IMPORT extern _declspec(dllimport)
 # define OPENSSL_GLOBAL
 # define OPENSSL_EXPORT extern _declspec(dllexport)
 # define OPENSSL_IMPORT extern _declspec(dllimport)
 # define OPENSSL_GLOBAL