X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcryptlib.c;h=e73d086eedd099e7be67f3f7b9aea940fe8ec988;hp=7b86e599ff60911000f082c327340379c983d784;hb=88737991d2c88cd8d7bebe506f3c26531fa282e0;hpb=630e4a6e59c2500c2a45e96c8027bca82dfd41c3 diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 7b86e599ff..e73d086eed 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -620,11 +620,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, } #endif -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__CYGWIN__) #include #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 -static int IsService(void) +int OPENSSL_isservice(void) { HWINSTA h; DWORD len; WCHAR *name; @@ -722,7 +722,7 @@ void OPENSSL_showfatal (const char *fmta,...) #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); @@ -754,6 +754,7 @@ 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)