diff options
author | Richard Levitte <levitte@openssl.org> | 2004-10-14 07:48:59 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-10-14 07:48:59 +0200 |
commit | 5b0f1f7d1375c31280a68b51d5737f4d95df06bf (patch) | |
tree | cb12e8dec575ee70f1a3a40ceaedb66c53ed5b29 /crypto/comp | |
parent | Oops! (diff) | |
download | openssl-5b0f1f7d1375c31280a68b51d5737f4d95df06bf.tar.xz openssl-5b0f1f7d1375c31280a68b51d5737f4d95df06bf.zip |
Because libraries on Windows lack useful version information, the zlib
guys had to change the name to differentiate with older versions when
a backward incompatibility came up. Of course, we need to adapt.
This change simply tries to load the library through the newer name
(ZLIB1) first, and if that fails, it tries the good old ZLIB.
Diffstat (limited to 'crypto/comp')
-rw-r--r-- | crypto/comp/c_zlib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c index 7553a2d107..64101bd084 100644 --- a/crypto/comp/c_zlib.c +++ b/crypto/comp/c_zlib.c @@ -357,7 +357,17 @@ COMP_METHOD *COMP_zlib(void) if (!zlib_loaded) { #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) - zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0); + zlib_dso = DSO_load(NULL, "ZLIB1", NULL, 0); + if (!zlib_dso) + { + zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0); + if (zlib_dso) + { + /* Clear the errors from the first failed + DSO_load() */ + ERR_clear_error(); + } + } #else zlib_dso = DSO_load(NULL, "z", NULL, 0); #endif |