X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fthreads%2Fth-lock.c;h=14aae5f9128751cd01707aa3f4ee29eb8140d14e;hb=42a36658c196f95fb08775241c148baa26d45250;hp=21293f20f0bdb2c6f283f79cfe3e8891af8b6bd1;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd;p=oweals%2Fopenssl.git diff --git a/crypto/threads/th-lock.c b/crypto/threads/th-lock.c index 21293f20f0..14aae5f912 100644 --- a/crypto/threads/th-lock.c +++ b/crypto/threads/th-lock.c @@ -63,7 +63,7 @@ #ifdef LINUX #include #endif -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 #include #endif #ifdef SOLARIS @@ -74,16 +74,18 @@ #include #include #endif -#include "lhash.h" -#include "crypto.h" -#include "buffer.h" -#include "e_os.h" -#include "x509.h" -#include "ssl.h" -#include "err.h" - -#ifndef NOPROTO -int CRYPTO_thread_setup(void); +#ifdef PTHREADS +#include +#endif +#include +#include +#include +#include "../../e_os.h" +#include +#include +#include + +void CRYPTO_thread_setup(void); void CRYPTO_thread_cleanup(void); static void irix_locking_callback(int mode,int type,char *file,int line); @@ -95,38 +97,24 @@ static unsigned long irix_thread_id(void ); static unsigned long solaris_thread_id(void ); static unsigned long pthreads_thread_id(void ); -#else -int CRYPOTO_thread_setup(); -void CRYPTO_cleanup(); - -static void irix_locking_callback(); -static void solaris_locking_callback(); -static void win32_locking_callback(); -static void pthreads_locking_callback(); - -static unsigned long irix_thread_id(); -static unsigned long solaris_thread_id(); -static unsigned long pthreads_thread_id(); - -#endif - /* usage: * CRYPTO_thread_setup(); - * applicaion code + * application code * CRYPTO_thread_cleanup(); */ #define THREAD_STACK_SIZE (16*1024) -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 -static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; +static HANDLE *lock_cs; -int CRYPTO_thread_setup(void) +void CRYPTO_thread_setup(void) { int i; - for (i=0; i