Engage DllMain on Windows. Partial backport from HEAD. Unlike HEAD,
it doesn't get engaged on __CYGWIN__, because I'm not sure is *all* Cygwin installations are equipped with windows.h...
This commit is contained in:
@@ -530,14 +530,14 @@ my %table=(
|
|||||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||||
|
|
||||||
# MinGW
|
# MinGW
|
||||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:-D_DLL:-mno-cygwin:.dll",
|
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll",
|
||||||
|
|
||||||
# UWIN
|
# UWIN
|
||||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||||
|
|
||||||
# Cygwin
|
# Cygwin
|
||||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:::.dll",
|
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:-D_WINDLL::.dll",
|
||||||
|
|
||||||
# DJGPP
|
# DJGPP
|
||||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
|
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
|
||||||
|
|||||||
4
TABLE
4
TABLE
@@ -94,7 +94,7 @@ $rmd160_obj = asm/rm86-out.o
|
|||||||
$rc5_obj = asm/r586-out.o
|
$rc5_obj = asm/r586-out.o
|
||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= cygwin-shared
|
$shared_target= cygwin-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -D_WINDLL
|
||||||
$shared_ldflag =
|
$shared_ldflag =
|
||||||
$shared_extension = .dll
|
$shared_extension = .dll
|
||||||
$ranlib =
|
$ranlib =
|
||||||
@@ -3569,7 +3569,7 @@ $rmd160_obj = asm/rm86-out.o
|
|||||||
$rc5_obj = asm/r586-out.o
|
$rc5_obj = asm/r586-out.o
|
||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target= cygwin-shared
|
$shared_target= cygwin-shared
|
||||||
$shared_cflag = -D_DLL
|
$shared_cflag = -D_WINDLL
|
||||||
$shared_ldflag = -mno-cygwin
|
$shared_ldflag = -mno-cygwin
|
||||||
$shared_extension = .dll
|
$shared_extension = .dll
|
||||||
$ranlib =
|
$ranlib =
|
||||||
|
|||||||
@@ -480,13 +480,12 @@ const char *CRYPTO_get_lock_name(int type)
|
|||||||
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DLL
|
#if defined(_WIN32) && defined(_WINDLL)
|
||||||
#ifdef OPENSSL_SYS_WIN32
|
|
||||||
|
|
||||||
/* All we really need to do is remove the 'error' state when a thread
|
/* All we really need to do is remove the 'error' state when a thread
|
||||||
* detaches */
|
* detaches */
|
||||||
|
|
||||||
BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||||
LPVOID lpvReserved)
|
LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
switch(fdwReason)
|
switch(fdwReason)
|
||||||
@@ -505,8 +504,6 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void OpenSSLDie(const char *file,int line,const char *assertion)
|
void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
|||||||
Reference in New Issue
Block a user