aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/cryptlib.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-13 09:48:21 +0100
committermarha <marha@users.sourceforge.net>2013-02-13 09:51:39 +0100
commitaaf21968deb85b635cb6aa6544df233ea5981346 (patch)
tree450a73e83a174325e6a69ad69eb4011c2eb7df8c /openssl/crypto/cryptlib.c
parent8add148a4cf71b8bdab05a6b7e14824b5062da5e (diff)
downloadvcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.tar.gz
vcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.tar.bz2
vcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.zip
Update to following packages:
openssl-1.0.1e freetype-2.4.11
Diffstat (limited to 'openssl/crypto/cryptlib.c')
-rw-r--r--openssl/crypto/cryptlib.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/openssl/crypto/cryptlib.c b/openssl/crypto/cryptlib.c
index 766ea8cac..304c6b706 100644
--- a/openssl/crypto/cryptlib.c
+++ b/openssl/crypto/cryptlib.c
@@ -504,7 +504,7 @@ void CRYPTO_THREADID_current(CRYPTO_THREADID *id)
CRYPTO_THREADID_set_numeric(id, (unsigned long)find_thread(NULL));
#else
/* For everything else, default to using the address of 'errno' */
- CRYPTO_THREADID_set_pointer(id, &errno);
+ CRYPTO_THREADID_set_pointer(id, (void*)&errno);
#endif
}
@@ -704,6 +704,7 @@ void OPENSSL_cpuid_setup(void)
}
else
vec = OPENSSL_ia32_cpuid();
+
/*
* |(1<<10) sets a reserved bit to signal that variable
* was initialized already... This is to avoid interference
@@ -924,3 +925,16 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
}
void *OPENSSL_stderr(void) { return stderr; }
+
+int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
+ {
+ size_t i;
+ const unsigned char *a = in_a;
+ const unsigned char *b = in_b;
+ unsigned char x = 0;
+
+ for (i = 0; i < len; i++)
+ x |= a[i] ^ b[i];
+
+ return x;
+ }