IMPLEMENT_STACK_OF(CRYPTO_dynlock)
/* real #defines in crypto.h, keep these upto date */
-static const char* lock_names[CRYPTO_NUM_LOCKS] =
+static const char* const lock_names[CRYPTO_NUM_LOCKS] =
{
"<<ERROR>>",
"err",
else
/* If we found a place with a NULL pointer, put our pointer
in it. */
- sk_CRYPTO_dynlock_set(dyn_locks,i,pointer);
+ (void)sk_CRYPTO_dynlock_set(dyn_locks,i,pointer);
CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
if (i == -1)
#endif
if (pointer->references <= 0)
{
- sk_CRYPTO_dynlock_set(dyn_locks, i, NULL);
+ (void)sk_CRYPTO_dynlock_set(dyn_locks, i, NULL);
}
else
pointer = NULL;
unsigned long OPENSSL_ia32cap_P=0;
unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; }
-int OPENSSL_NONPIC_relocated=0;
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) && !defined(I386_ONLY)
#define OPENSSL_CPUID_SETUP
#else
unsigned long *OPENSSL_ia32cap_loc(void) { return NULL; }
#endif
+int OPENSSL_NONPIC_relocated = 0;
#if !defined(OPENSSL_CPUID_SETUP)
void OPENSSL_cpuid_setup(void) {}
#endif
#include <tchar.h>
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
-static int IsService(void)
+int OPENSSL_isservice(void)
{ HWINSTA h;
DWORD len;
WCHAR *name;
#endif
else return 0;
}
+#else
+int OPENSSL_isservice(void) { return 0; }
#endif
void OPENSSL_showfatal (const char *fmta,...)
{ va_list ap;
TCHAR buf[256];
const TCHAR *fmt;
+#ifdef STD_ERROR_HANDLE /* what a dirty trick! */
HANDLE h;
if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL &&
va_end (ap);
return;
}
+#endif
if (sizeof(TCHAR)==sizeof(char))
- fmt=fmta;
+ fmt=(const TCHAR *)fmta;
else do
{ int keepgoing;
size_t len_0=strlen(fmta)+1,i;
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
/* this -------------v--- guards NT-specific calls */
- if (GetVersion() < 0x80000000 && IsService())
+ if (GetVersion() < 0x80000000 && OPENSSL_isservice())
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
const TCHAR *pmsg=buf;
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
}
else
#endif
- { MSGBOXPARAMS m;
-
- m.cbSize = sizeof(m);
- m.hwndOwner = NULL;
- m.lpszCaption = _T("OpenSSL: FATAL");
- m.dwStyle = MB_OK;
- m.hInstance = NULL;
- m.lpszIcon = IDI_ERROR;
- m.dwContextHelpId = 0;
- m.lpfnMsgBoxCallback = NULL;
- m.dwLanguageId = MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US);
- m.lpszText = buf;
-
- MessageBoxIndirect (&m);
- }
+ MessageBox (NULL,buf,_T("OpenSSL: FATAL"),MB_OK|MB_ICONSTOP);
}
#else
void OPENSSL_showfatal (const char *fmta,...)
vfprintf (stderr,fmta,ap);
va_end (ap);
}
+int OPENSSL_isservice (void) { return 0; }
#endif
void OpenSSLDie(const char *file,int line,const char *assertion)