X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fcryptlib.c;h=7e1d780f6c917d851430d34cb1f72562eccab086;hb=f6c006ea76304a52cf9212695525e1bcc6cf6c22;hp=138708b8672c7770bb7203dda150b841b41a7747;hpb=7b9f8f7f03eda2faa1cdd42ed29a0b70e60eaf59;p=openssl.git diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 138708b867..7e1d780f6c 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -195,55 +195,6 @@ void OPENSSL_cpuid_setup(void) } #endif -#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_WINDLL) -# ifdef __CYGWIN__ -/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */ -# include -/* - * this has side-effect of _WIN32 getting defined, which otherwise is - * mutually exclusive with __CYGWIN__... - */ -# endif - -/* - * All we really need to do is remove the 'error' state when a thread - * detaches - */ - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - OPENSSL_cpuid_setup(); -# if defined(_WIN32_WINNT) - { - IMAGE_DOS_HEADER *dos_header = (IMAGE_DOS_HEADER *) hinstDLL; - IMAGE_NT_HEADERS *nt_headers; - - if (dos_header->e_magic == IMAGE_DOS_SIGNATURE) { - nt_headers = (IMAGE_NT_HEADERS *) ((char *)dos_header - + dos_header->e_lfanew); - if (nt_headers->Signature == IMAGE_NT_SIGNATURE && - hinstDLL != - (HINSTANCE) (nt_headers->OptionalHeader.ImageBase)) - OPENSSL_NONPIC_relocated = 1; - } - } -# endif - break; - case DLL_THREAD_ATTACH: - break; - case DLL_THREAD_DETACH: - ossl_init_thread_stop( - (struct thread_local_inits_st *)ossl_init_get_thread_local(0)); - break; - case DLL_PROCESS_DETACH: - break; - } - return (TRUE); -} -#endif - #if defined(_WIN32) && !defined(__CYGWIN__) # include # include @@ -449,11 +400,10 @@ int OPENSSL_isservice(void) } #endif -void OpenSSLDie(const char *file, int line, const char *assertion) +void OPENSSL_die(const char *message, const char *file, int line) { - OPENSSL_showfatal - ("%s(%d): OpenSSL internal error, assertion failed: %s\n", file, line, - assertion); + OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n", + file, line, message); #if !defined(_WIN32) || defined(__CYGWIN__) abort(); #else