mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-15 22:50:36 +02:00
fix VS 2015 openssl static link
This commit is contained in:
parent
75c2138957
commit
50ae257a52
@ -60,11 +60,18 @@ enum RSAPaddingMode
|
||||
// Crypto_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
//
|
||||
#if defined(_WIN32) && defined(POCO_DLL)
|
||||
#if defined(Crypto_EXPORTS)
|
||||
#define Crypto_API __declspec(dllexport)
|
||||
#if defined(_WIN32)
|
||||
#if defined(POCO_DLL)
|
||||
#if defined(Crypto_EXPORTS)
|
||||
#define Crypto_API __declspec(dllexport)
|
||||
#else
|
||||
#define Crypto_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define Crypto_API __declspec(dllimport)
|
||||
#if (POCO_MSVS_VERSION >= 2015) // needed for OpenSSL
|
||||
#pragma comment(lib, "legacy_stdio_definitions.lib")
|
||||
#pragma comment(lib, "legacy_stdio_wide_specifiers.lib")
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -122,4 +122,10 @@ inline void OpenSSLInitializer::disableSSLInitialization()
|
||||
} } // namespace Poco::Crypto
|
||||
|
||||
|
||||
// needed for OpenSSL static link
|
||||
#if defined(_WIN32) && !defined(POCO_DLL) && (POCO_MSVS_VERSION >= 2015)
|
||||
extern "C" FILE * __cdecl __iob_func(void);
|
||||
#endif
|
||||
|
||||
|
||||
#endif // Crypto_OpenSSLInitializer_INCLUDED
|
||||
|
@ -184,3 +184,12 @@ void uninitializeCrypto()
|
||||
|
||||
|
||||
} } // namespace Poco::Crypto
|
||||
|
||||
// needed for OpenSSL static link
|
||||
#if defined(_WIN32) && !defined(POCO_DLL) && (POCO_MSVS_VERSION >= 2015)
|
||||
FILE * __cdecl __iob_func(void)
|
||||
{
|
||||
static FILE poco_iob[] = { stdin, stdout, stderr };
|
||||
return poco_iob;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user