projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sha256-586.pl: fix linking error.
[oweals/openssl.git]
/
crypto
/
threads
/
th-lock.c
diff --git
a/crypto/threads/th-lock.c
b/crypto/threads/th-lock.c
index 3ee978060c205244aff3a04b0cc8d41ce8ef13a3..14aae5f9128751cd01707aa3f4ee29eb8140d14e 100644
(file)
--- a/
crypto/threads/th-lock.c
+++ b/
crypto/threads/th-lock.c
@@
-63,7
+63,7
@@
#ifdef LINUX
#include <typedefs.h>
#endif
#ifdef LINUX
#include <typedefs.h>
#endif
-#ifdef WIN32
+#ifdef
OPENSSL_SYS_
WIN32
#include <windows.h>
#endif
#ifdef SOLARIS
#include <windows.h>
#endif
#ifdef SOLARIS
@@
-80,7
+80,7
@@
#include <openssl/lhash.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/lhash.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
-#include
<openssl/e_os.h>
+#include
"../../e_os.h"
#include <openssl/x509.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
@@
-105,7
+105,7
@@
static unsigned long pthreads_thread_id(void );
#define THREAD_STACK_SIZE (16*1024)
#define THREAD_STACK_SIZE (16*1024)
-#ifdef WIN32
+#ifdef
OPENSSL_SYS_
WIN32
static HANDLE *lock_cs;
static HANDLE *lock_cs;
@@
-113,7
+113,7
@@
void CRYPTO_thread_setup(void)
{
int i;
{
int i;
- lock_cs=
M
alloc(CRYPTO_num_locks() * sizeof(HANDLE));
+ lock_cs=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(HANDLE));
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_cs[i]=CreateMutex(NULL,FALSE,NULL);
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_cs[i]=CreateMutex(NULL,FALSE,NULL);
@@
-131,7
+131,7
@@
static void CRYPTO_thread_cleanup(void)
CRYPTO_set_locking_callback(NULL);
for (i=0; i<CRYPTO_num_locks(); i++)
CloseHandle(lock_cs[i]);
CRYPTO_set_locking_callback(NULL);
for (i=0; i<CRYPTO_num_locks(); i++)
CloseHandle(lock_cs[i]);
-
F
ree(lock_cs);
+
OPENSSL_f
ree(lock_cs);
}
void win32_locking_callback(int mode, int type, char *file, int line)
}
void win32_locking_callback(int mode, int type, char *file, int line)
@@
-146,7
+146,7
@@
void win32_locking_callback(int mode, int type, char *file, int line)
}
}
}
}
-#endif /* WIN32 */
+#endif /*
OPENSSL_SYS_
WIN32 */
#ifdef SOLARIS
#ifdef SOLARIS
@@
-164,11
+164,11
@@
void CRYPTO_thread_setup(void)
int i;
#ifdef USE_MUTEX
int i;
#ifdef USE_MUTEX
- lock_cs=
M
alloc(CRYPTO_num_locks() * sizeof(mutex_t));
+ lock_cs=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(mutex_t));
#else
#else
- lock_cs=
M
alloc(CRYPTO_num_locks() * sizeof(rwlock_t));
+ lock_cs=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(rwlock_t));
#endif
#endif
- lock_count=
M
alloc(CRYPTO_num_locks() * sizeof(long));
+ lock_count=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(long));
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_count[i]=0;
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_count[i]=0;
@@
-196,8
+196,8
@@
void CRYPTO_thread_cleanup(void)
rwlock_destroy(&(lock_cs[i]));
#endif
}
rwlock_destroy(&(lock_cs[i]));
#endif
}
-
F
ree(lock_cs);
-
F
ree(lock_count);
+
OPENSSL_f
ree(lock_cs);
+
OPENSSL_f
ree(lock_count);
}
void solaris_locking_callback(int mode, int type, char *file, int line)
}
void solaris_locking_callback(int mode, int type, char *file, int line)
@@
-267,7
+267,7
@@
void CRYPTO_thread_setup(void)
arena=usinit(filename);
unlink(filename);
arena=usinit(filename);
unlink(filename);
- lock_cs=
M
alloc(CRYPTO_num_locks() * sizeof(usema_t *));
+ lock_cs=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(usema_t *));
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_cs[i]=usnewsema(arena,1);
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_cs[i]=usnewsema(arena,1);
@@
-290,7
+290,7
@@
void CRYPTO_thread_cleanup(void)
usdumpsema(lock_cs[i],stdout,buf);
usfreesema(lock_cs[i],arena);
}
usdumpsema(lock_cs[i],stdout,buf);
usfreesema(lock_cs[i],arena);
}
-
F
ree(lock_cs);
+
OPENSSL_f
ree(lock_cs);
}
void irix_locking_callback(int mode, int type, char *file, int line)
}
void irix_locking_callback(int mode, int type, char *file, int line)
@@
-324,8
+324,8
@@
void CRYPTO_thread_setup(void)
{
int i;
{
int i;
- lock_cs=
M
alloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
- lock_count=
M
alloc(CRYPTO_num_locks() * sizeof(long));
+ lock_cs=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
+ lock_count=
OPENSSL_m
alloc(CRYPTO_num_locks() * sizeof(long));
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_count[i]=0;
for (i=0; i<CRYPTO_num_locks(); i++)
{
lock_count[i]=0;
@@
-345,8
+345,8
@@
void thread_cleanup(void)
{
pthread_mutex_destroy(&(lock_cs[i]));
}
{
pthread_mutex_destroy(&(lock_cs[i]));
}
-
F
ree(lock_cs);
-
F
ree(lock_count);
+
OPENSSL_f
ree(lock_cs);
+
OPENSSL_f
ree(lock_count);
}
void pthreads_locking_callback(int mode, int type, char *file,
}
void pthreads_locking_callback(int mode, int type, char *file,