summaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-08-01 14:27:43 +0000
committerAndy Polyakov <appro@openssl.org>2004-08-01 14:27:43 +0000
commit00555c2f2fa65701b40402f4bf47fc450bd5523d (patch)
tree7b433858f07d2658876e7631ffad3122632d22a6 /crypto/cryptlib.c
parent07d80f6f35fd3a087bbc631ce1210ccf73bf9ec5 (diff)
DLLEntryPoint is a collective name, not what linker looks for. However,
if we explicitly intruct the linker to set entry point, then we become obliged to initialize run-time library. Instead we can pick name run-time will call and such name is DllMain. Note that this applies to both "native" Win32 environment and Cygwin:-)
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r--crypto/cryptlib.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 23264ec823..e0380a38f4 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -571,13 +571,12 @@ void OPENSSL_cpuid_setup()
void OPENSSL_cpuid_setup() {}
#endif
-#ifdef _DLL
-#ifdef OPENSSL_SYS_WIN32
+#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_DLL)
/* All we really need to do is remove the 'error' state when a thread
* detaches */
-BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
LPVOID lpvReserved)
{
switch(fdwReason)
@@ -597,8 +596,6 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
}
#endif
-#endif
-
void OpenSSLDie(const char *file,int line,const char *assertion)
{
fprintf(stderr,