diff options
Diffstat (limited to 'src/lib/libcrypto/cryptlib.c')
| -rw-r--r-- | src/lib/libcrypto/cryptlib.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index b4449b86d6..24fe123e14 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
| @@ -731,7 +731,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, | |||
| 731 | case DLL_THREAD_ATTACH: | 731 | case DLL_THREAD_ATTACH: |
| 732 | break; | 732 | break; |
| 733 | case DLL_THREAD_DETACH: | 733 | case DLL_THREAD_DETACH: |
| 734 | ERR_remove_state(0); | ||
| 735 | break; | 734 | break; |
| 736 | case DLL_PROCESS_DETACH: | 735 | case DLL_PROCESS_DETACH: |
| 737 | break; | 736 | break; |
| @@ -743,6 +742,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, | |||
| 743 | #if defined(_WIN32) && !defined(__CYGWIN__) | 742 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 744 | #include <tchar.h> | 743 | #include <tchar.h> |
| 745 | #include <signal.h> | 744 | #include <signal.h> |
| 745 | #ifdef __WATCOMC__ | ||
| 746 | #if defined(_UNICODE) || defined(__UNICODE__) | ||
| 747 | #define _vsntprintf _vsnwprintf | ||
| 748 | #else | ||
| 749 | #define _vsntprintf _vsnprintf | ||
| 750 | #endif | ||
| 751 | #endif | ||
| 752 | #ifdef _MSC_VER | ||
| 753 | #define alloca _alloca | ||
| 754 | #endif | ||
| 746 | 755 | ||
| 747 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 | 756 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 |
| 748 | int OPENSSL_isservice(void) | 757 | int OPENSSL_isservice(void) |
| @@ -773,11 +782,7 @@ int OPENSSL_isservice(void) | |||
| 773 | 782 | ||
| 774 | if (len>512) return -1; /* paranoia */ | 783 | if (len>512) return -1; /* paranoia */ |
| 775 | len++,len&=~1; /* paranoia */ | 784 | len++,len&=~1; /* paranoia */ |
| 776 | #ifdef _MSC_VER | ||
| 777 | name=(WCHAR *)_alloca(len+sizeof(WCHAR)); | ||
| 778 | #else | ||
| 779 | name=(WCHAR *)alloca(len+sizeof(WCHAR)); | 785 | name=(WCHAR *)alloca(len+sizeof(WCHAR)); |
| 780 | #endif | ||
| 781 | if (!GetUserObjectInformationW (h,UOI_NAME,name,len,&len)) | 786 | if (!GetUserObjectInformationW (h,UOI_NAME,name,len,&len)) |
| 782 | return -1; | 787 | return -1; |
| 783 | 788 | ||
| @@ -822,11 +827,7 @@ void OPENSSL_showfatal (const char *fmta,...) | |||
| 822 | size_t len_0=strlen(fmta)+1,i; | 827 | size_t len_0=strlen(fmta)+1,i; |
| 823 | WCHAR *fmtw; | 828 | WCHAR *fmtw; |
| 824 | 829 | ||
| 825 | #ifdef _MSC_VER | 830 | fmtw = (WCHAR *)alloca(len_0*sizeof(WCHAR)); |
| 826 | fmtw = (WCHAR *)_alloca (len_0*sizeof(WCHAR)); | ||
| 827 | #else | ||
| 828 | fmtw = (WCHAR *)alloca (len_0*sizeof(WCHAR)); | ||
| 829 | #endif | ||
| 830 | if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; } | 831 | if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; } |
| 831 | 832 | ||
| 832 | #ifndef OPENSSL_NO_MULTIBYTE | 833 | #ifndef OPENSSL_NO_MULTIBYTE |
