bn/bn_exp.c: make it indent-friendly.
[openssl.git] / crypto / lock.c
index bbce52addb8a2006d1dabe81f65c552a71ade00d..4e6b3b7e96ff78971540f9705875f7cc04a2638e 100644 (file)
 
 #include "cryptlib.h"
 #include <openssl/safestack.h>
-#ifdef OPENSSL_FIPS
-#include <openssl/fips.h>
-#endif
 
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
+#if defined(OPENSSL_SYS_WIN32)
 static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
 #endif
 
@@ -185,15 +182,15 @@ static STACK_OF(OPENSSL_STRING) *app_locks=NULL;
 static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
 
 
-static void (MS_FAR *locking_callback)(int mode,int type,
+static void (*locking_callback)(int mode,int type,
        const char *file,int line)=0;
-static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
+static int (*add_lock_callback)(int *pointer,int amount,
        int type,const char *file,int line)=0;
-static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
+static struct CRYPTO_dynlock_value *(*dynlock_create_callback)
        (const char *file,int line)=0;
-static void (MS_FAR *dynlock_lock_callback)(int mode,
+static void (*dynlock_lock_callback)(int mode,
        struct CRYPTO_dynlock_value *l, const char *file,int line)=0;
-static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
+static void (*dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
        const char *file,int line)=0;
 
 int CRYPTO_get_new_lockid(char *name)
@@ -201,7 +198,7 @@ int CRYPTO_get_new_lockid(char *name)
        char *str;
        int i;
 
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
+#if defined(OPENSSL_SYS_WIN32)
        /* A hack to make Visual C++ 5.0 work correctly when linking as
         * a DLL using /MT. Without this, the application cannot use
         * any floating point printf's.
@@ -384,7 +381,7 @@ void CRYPTO_set_dynlock_lock_callback(void (*func)(int mode,
        struct CRYPTO_dynlock_value *l, const char *file, int line))
        {
 #ifdef OPENSSL_FIPS
-       FIPS_set_locking_callback(CRYPTO_lock);
+       FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
 #endif
        dynlock_lock_callback=func;
        }
@@ -412,7 +409,7 @@ void CRYPTO_set_locking_callback(void (*func)(int mode,int type,
                                              const char *file,int line))
        {
 #ifdef OPENSSL_FIPS
-       FIPS_set_locking_callback(CRYPTO_lock);
+       FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
 #endif
        locking_callback=func;
        }