diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
commit | e778802f53c8d47e96a6e4cbc776eb6e1d4c461a (patch) | |
tree | 719d4dd0fc69b355c6d8329af1f90b2c4f603548 /crypto/cryptlib.c | |
parent | d77b3054cd87c2b13fa0169931f74b8e0dac5252 (diff) |
Massive constification.
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r-- | crypto/cryptlib.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 3614e3fc5d..920ff184e2 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -67,7 +67,7 @@ static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ #endif /* real #defines in crypto.h, keep these upto date */ -static char* lock_names[CRYPTO_NUM_LOCKS] = +static const char* lock_names[CRYPTO_NUM_LOCKS] = { "<<ERROR>>", "err", @@ -96,9 +96,9 @@ static STACK *app_locks=NULL; #ifndef NOPROTO static void (MS_FAR *locking_callback)(int mode,int type, - char *file,int line)=NULL; + const char *file,int line)=NULL; static int (MS_FAR *add_lock_callback)(int *pointer,int amount, - int type,char *file,int line)=NULL; + int type,const char *file,int line)=NULL; static unsigned long (MS_FAR *id_callback)(void)=NULL; #else static void (MS_FAR *locking_callback)()=NULL; @@ -135,24 +135,26 @@ char *name; return(i); } -void (*CRYPTO_get_locking_callback(P_V))(P_I_I_P_I) +void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, + int line) { return(locking_callback); } -int (*CRYPTO_get_add_lock_callback(P_V))(P_IP_I_I_P_I) +int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type, + const char *file,int line) { return(add_lock_callback); } -void CRYPTO_set_locking_callback(func) -void (*func)(P_I_I_P_I); +void CRYPTO_set_locking_callback(void (*func)(int mode,int type, + const char *file,int line)) { locking_callback=func; } -void CRYPTO_set_add_lock_callback(func) -int (*func)(P_IP_I_I_P_I); +void CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount,int type, + const char *file,int line)) { add_lock_callback=func; } @@ -192,7 +194,7 @@ unsigned long CRYPTO_thread_id() void CRYPTO_lock(mode,type,file,line) int mode; int type; -char *file; +const char *file; int line; { #ifdef LOCK_DEBUG @@ -226,7 +228,7 @@ int CRYPTO_add_lock(pointer,amount,type,file,line) int *pointer; int amount; int type; -char *file; +const char *file; int line; { int ret; @@ -265,7 +267,7 @@ int line; return(ret); } -char *CRYPTO_get_lock_name(type) +const char *CRYPTO_get_lock_name(type) int type; { if (type < 0) |