summaryrefslogtreecommitdiffstats
path: root/e_os2.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-03-05 13:45:34 +0000
committerRichard Levitte <levitte@openssl.org>2001-03-05 13:45:34 +0000
commit5cac59b6c1238ffc911c054b51db42c3aca3aaa2 (patch)
tree4fb3ab4721006317a9f52d579371db774afbd3cf /e_os2.h
parentbad4058574a110c972616e4b2f629a6268322eb3 (diff)
Add the possibility for option macros and start using it to indicate
for Windows compilations if DLL linkage is required or not.
Diffstat (limited to 'e_os2.h')
-rw-r--r--e_os2.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/e_os2.h b/e_os2.h
index f279fa1d93..ed90f222e2 100644
--- a/e_os2.h
+++ b/e_os2.h
@@ -113,6 +113,21 @@ extern "C" {
# 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
@@ -189,7 +204,7 @@ extern "C" {
# 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