There should be no reason to typecast the argument to
CRYPTO_set_locking_callback():

diff -u3 -Hb -r openssl-SNAP-20060713\crypto\threads\th-lock.c crypto\threads\th-lock.c
--- openssl-SNAP-20060713\crypto\threads\th-lock.c Fri Mar 21 18:15:34 2003
+++ crypto\threads\th-lock.c Thu Jul 13 15:08:40 2006
@@ -88,10 +88,10 @@
void CRYPTO_thread_setup(void);
void CRYPTO_thread_cleanup(void);

-static void irix_locking_callback(int mode,int type,char *file,int line);
-static void solaris_locking_callback(int mode,int type,char *file,int line);
-static void win32_locking_callback(int mode,int type,char *file,int line);
-static void pthreads_locking_callback(int mode,int type,char *file,int line);
+static void irix_locking_callback(int mode,int type,const char *file,int line);
+static void solaris_locking_callback(int mode,int type,const char *file,int line);
+static void win32_locking_callback(int mode,int type,const char *file,int line);
+static void pthreads_locking_callback(int mode,int type,const char *file,int line);

static unsigned long irix_thread_id(void );
static unsigned long solaris_thread_id(void );
@@ -119,12 +119,12 @@
lock_cs[i]=CreateMutex(NULL,FALSE,NULL);
}

- CRYPTO_set_locking_callback((void (*)(int,int,char *,int))win32_locking_callback);
+ CRYPTO_set_locking_callback(win32_locking_callback );
/* id callback defined */
return(1);
}

-static void CRYPTO_thread_cleanup(void)
+void CRYPTO_thread_cleanup(void)
{
int i;

@@ -134,7 +134,7 @@
OPENSSL_free(lock_cs);
}

-void win32_locking_callback(int mode, int type, char *file, int line)
+void win32_locking_callback(int mode, int type, const char *file, int line)
{
if (mode & CRYPTO_LOCK)
{
@@ -180,7 +180,7 @@
}

CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id);
- CRYPTO_set_locking_callback((void (*)())solaris_locking_callback);
+ CRYPTO_set_locking_callback(solaris_locking_callba ck);
}

void CRYPTO_thread_cleanup(void)
@@ -200,7 +200,7 @@
OPENSSL_free(lock_count);
}

-void solaris_locking_callback(int mode, int type, char *file, int line)
+void solaris_locking_callback(int mode, int type, const char *file, int line)
{
#if 0
fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
@@ -274,7 +274,7 @@
}

CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id);
- CRYPTO_set_locking_callback((void (*)())irix_locking_callback);
+ CRYPTO_set_locking_callback(irix_locking_callback) ;
}

void CRYPTO_thread_cleanup(void)
@@ -293,7 +293,7 @@
OPENSSL_free(lock_cs);
}

-void irix_locking_callback(int mode, int type, char *file, int line)
+void irix_locking_callback(int mode, int type, const char *file, int line)
{
if (mode & CRYPTO_LOCK)
{
@@ -333,7 +333,7 @@
}

CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id);
- CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback);
+ CRYPTO_set_locking_callback(pthreads_locking_callb ack);
}

void thread_cleanup(void)
@@ -349,7 +349,7 @@
OPENSSL_free(lock_count);
}

-void pthreads_locking_callback(int mode, int type, char *file,
+void pthreads_locking_callback(int mode, int type, const char *file,
int line)
{
#if 0

--------------------------
--gv
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org