Update from HEAD.
[openssl.git] / crypto / lhash / lhash.c
index 9d815f0ca0c77c18ea2439d2667716bf9ce12060..ed5ff1e4e211a715a36d9bd2be56fac7e4bb51b1 100644 (file)
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
 
-const char *lh_version="lhash" OPENSSL_VERSION_PTEXT;
+const char lh_version[]="lhash" OPENSSL_VERSION_PTEXT;
 
 #undef MIN_NODES 
 #define MIN_NODES      16
@@ -197,7 +197,7 @@ void *lh_insert(LHASH *lh, const void *data)
                        }
                nn->data=data;
                nn->next=NULL;
-#ifndef NO_HASH_COMP
+#ifndef OPENSSL_NO_HASH_COMP
                nn->hash=hash;
 #endif
                *rn=nn;
@@ -268,7 +268,7 @@ void *lh_retrieve(LHASH *lh, const void *data)
        }
 
 static void doall_util_fn(LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
-                       LHASH_DOALL_ARG_FN_TYPE func_arg, const void *arg)
+                         LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
        {
        int i;
        LHASH_NODE *a,*n;
@@ -294,12 +294,12 @@ static void doall_util_fn(LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
 
 void lh_doall(LHASH *lh, LHASH_DOALL_FN_TYPE func)
        {
-       doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)NULL, NULL);
+       doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL);
        }
 
-void lh_doall_arg(LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, const void *arg)
+void lh_doall_arg(LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)
        {
-       doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)NULL, func, arg);
+       doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg);
        }
 
 static void expand(LHASH *lh)
@@ -318,7 +318,7 @@ static void expand(LHASH *lh)
        
        for (np= *n1; np != NULL; )
                {
-#ifndef NO_HASH_COMP
+#ifndef OPENSSL_NO_HASH_COMP
                hash=np->hash;
 #else
                hash=lh->hash(np->data);
@@ -415,7 +415,7 @@ static LHASH_NODE **getrn(LHASH *lh, const void *data, unsigned long *rhash)
        ret= &(lh->b[(int)nn]);
        for (n1= *ret; n1 != NULL; n1=n1->next)
                {
-#ifndef NO_HASH_COMP
+#ifndef OPENSSL_NO_HASH_COMP
                lh->num_hash_comps++;
                if (n1->hash != hash)
                        {