summaryrefslogtreecommitdiffstats
path: root/crypto/init.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-03-31 16:15:02 +0200
committerRichard Levitte <levitte@openssl.org>2019-04-01 06:14:50 +0200
commit31b6ed76dfd53529b74e79830c81372d0b756929 (patch)
treeea7a958315ceddda691ffc562cdff54578153d4a /crypto/init.c
parent9c119bc6b54f4851898134db28c2a01947b5efba (diff)
Rework DSO API conditions and configuration option
'no-dso' is meaningless, as it doesn't get any macro defined. Therefore, we remove all checks of OPENSSL_NO_DSO. However, there may be some odd platforms with no DSO scheme. For those, we generate the internal macro DSO_NONE aand use it. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/#8622)
Diffstat (limited to 'crypto/init.c')
-rw-r--r--crypto/init.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/init.c b/crypto/init.c
index dfc5c5f81c..463da9853d 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -160,8 +160,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_nodelete)
{
OSSL_TRACE(INIT, "ossl_init_load_crypto_nodelete()\n");
-#if !defined(OPENSSL_NO_DSO) \
- && !defined(OPENSSL_USE_NODELETE) \
+#if !defined(OPENSSL_USE_NODELETE) \
&& !defined(OPENSSL_NO_PINSHARED)
# if defined(DSO_WIN32) && !defined(_WIN32_WCE)
{
@@ -179,7 +178,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_nodelete)
(ret == TRUE ? "No!" : "Yes."));
return (ret == TRUE) ? 1 : 0;
}
-# else
+# elif !defined(DSO_NONE)
/*
* Deliberately leak a reference to ourselves. This will force the library
* to remain loaded until the atexit() handler is run at process exit.
@@ -733,8 +732,7 @@ int OPENSSL_atexit(void (*handler)(void))
{
OPENSSL_INIT_STOP *newhand;
-#if !defined(OPENSSL_NO_DSO) \
- && !defined(OPENSSL_USE_NODELETE)\
+#if !defined(OPENSSL_USE_NODELETE)\
&& !defined(OPENSSL_NO_PINSHARED)
{
union {
@@ -759,7 +757,7 @@ int OPENSSL_atexit(void (*handler)(void))
if (!ret)
return 0;
}
-# else
+# elif !defined(DSO_NONE)
/*
* Deliberately leak a reference to the handler. This will force the
* library/code containing the handler to remain loaded until we run the