diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
commit | 26a3a48d65c7464b400ec1de439994d7f0d25fed (patch) | |
tree | 91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/threads/th-lock.c | |
parent | de42b6a7a82be33d2976ab605e74d7bc95b71447 (diff) |
There have been a number of complaints from a number of sources that names
like Malloc, Realloc and especially Free conflict with already existing names
on some operating systems or other packages. That is reason enough to change
the names of the OpenSSL memory allocation macros to something that has a
better chance of being unique, like prepending them with OPENSSL_.
This change includes all the name changes needed throughout all C files.
Diffstat (limited to 'crypto/threads/th-lock.c')
-rw-r--r-- | crypto/threads/th-lock.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/threads/th-lock.c b/crypto/threads/th-lock.c index 3ee978060c..553d2218de 100644 --- a/crypto/threads/th-lock.c +++ b/crypto/threads/th-lock.c @@ -113,7 +113,7 @@ void CRYPTO_thread_setup(void) { int i; - lock_cs=Malloc(CRYPTO_num_locks() * sizeof(HANDLE)); + lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE)); 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]); - Free(lock_cs); + OPENSSL_free(lock_cs); } void win32_locking_callback(int mode, int type, char *file, int line) @@ -164,11 +164,11 @@ void CRYPTO_thread_setup(void) int i; #ifdef USE_MUTEX - lock_cs=Malloc(CRYPTO_num_locks() * sizeof(mutex_t)); + lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t)); #else - lock_cs=Malloc(CRYPTO_num_locks() * sizeof(rwlock_t)); + lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t)); #endif - lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); + lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); 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 } - Free(lock_cs); - Free(lock_count); + OPENSSL_free(lock_cs); + OPENSSL_free(lock_count); } 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); - lock_cs=Malloc(CRYPTO_num_locks() * sizeof(usema_t *)); + lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *)); 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); } - Free(lock_cs); + OPENSSL_free(lock_cs); } void irix_locking_callback(int mode, int type, char *file, int line) @@ -324,8 +324,8 @@ void CRYPTO_thread_setup(void) { int i; - lock_cs=Malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); - lock_count=Malloc(CRYPTO_num_locks() * sizeof(long)); + lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); + lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); 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])); } - Free(lock_cs); - Free(lock_count); + OPENSSL_free(lock_cs); + OPENSSL_free(lock_count); } void pthreads_locking_callback(int mode, int type, char *file, |