Upgrade to openssl-1.0.0a
- Updated README.android
- Updated openssl.version
- Ran ./import_openssl.sh import .../openssl-1.0.0a.tar.gz
(which is responsible for the rest of the changes)
Change-Id: I3214fb8cb5297d68edc7632bbd9027952fec559b
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 9a39d7e..b4449b8 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -749,6 +749,18 @@
{ HWINSTA h;
DWORD len;
WCHAR *name;
+ static union { void *p; int (*f)(void); } _OPENSSL_isservice = { NULL };
+
+ if (_OPENSSL_isservice.p == NULL) {
+ HANDLE h = GetModuleHandle(NULL);
+ if (h != NULL)
+ _OPENSSL_isservice.p = GetProcAddress(h,"_OPENSSL_isservice");
+ if (_OPENSSL_isservice.p == NULL)
+ _OPENSSL_isservice.p = (void *)-1;
+ }
+
+ if (_OPENSSL_isservice.p != (void *)-1)
+ return (*_OPENSSL_isservice.f)();
(void)GetDesktopWindow(); /* return value is ignored */