Sort openssl.ec, the configuration file for mkerr.pl.
[openssl.git] / crypto / conf / conf_api.c
index 8216e64525912b0bb233eb467329e53f35d85334..9615df5873848e8e0101482f18a44a3151f470a0 100644 (file)
 #include <string.h>
 #include <openssl/conf.h>
 #include <openssl/conf_api.h>
 #include <string.h>
 #include <openssl/conf.h>
 #include <openssl/conf_api.h>
+#include "e_os.h"
 
 static void value_free_hash(CONF_VALUE *a, LHASH *conf);
 static void value_free_stack(CONF_VALUE *a,LHASH *conf);
 
 static void value_free_hash(CONF_VALUE *a, LHASH *conf);
 static void value_free_stack(CONF_VALUE *a,LHASH *conf);
+static IMPLEMENT_LHASH_DOALL_ARG_FN(value_free_hash, CONF_VALUE *, LHASH *)
+static IMPLEMENT_LHASH_DOALL_ARG_FN(value_free_stack, CONF_VALUE *, LHASH *)
 /* We don't use function pointer casting or wrapper functions - but cast each
  * callback parameter inside the callback functions. */
 /* static unsigned long hash(CONF_VALUE *v); */
 /* We don't use function pointer casting or wrapper functions - but cast each
  * callback parameter inside the callback functions. */
 /* static unsigned long hash(CONF_VALUE *v); */
-static unsigned long hash(void *v_void);
+static unsigned long hash(const void *v_void);
 /* static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); */
 /* static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); */
-static int cmp_conf(void *a_void,void *b_void);
+static int cmp_conf(const void *a_void,const void *b_void);
 
 /* Up until OpenSSL 0.9.5a, this was get_section */
 CONF_VALUE *_CONF_get_section(CONF *conf, char *section)
 
 /* Up until OpenSSL 0.9.5a, this was get_section */
 CONF_VALUE *_CONF_get_section(CONF *conf, char *section)
@@ -198,13 +201,13 @@ void _CONF_free_data(CONF *conf)
 
        conf->data->down_load=0; /* evil thing to make sure the 'OPENSSL_free()'
                                  * works as expected */
 
        conf->data->down_load=0; /* evil thing to make sure the 'OPENSSL_free()'
                                  * works as expected */
-       lh_doall_arg(conf->data, (LHASH_DOALL_ARG_FN_TYPE)value_free_hash,
+       lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(value_free_hash),
                        conf->data);
 
        /* We now have only 'section' entries in the hash table.
         * Due to problems with */
 
                        conf->data);
 
        /* We now have only 'section' entries in the hash table.
         * Due to problems with */
 
-       lh_doall_arg(conf->data, (LHASH_DOALL_ARG_FN_TYPE)value_free_stack,
+       lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(value_free_stack),
                        conf->data);
        lh_free(conf->data);
        }
                        conf->data);
        lh_free(conf->data);
        }
@@ -239,14 +242,14 @@ static void value_free_stack(CONF_VALUE *a, LHASH *conf)
        }
 
 /* static unsigned long hash(CONF_VALUE *v) */
        }
 
 /* static unsigned long hash(CONF_VALUE *v) */
-static unsigned long hash(void *v_void)
+static unsigned long hash(const void *v_void)
        {
        CONF_VALUE *v = (CONF_VALUE *)v_void;
        return((lh_strhash(v->section)<<2)^lh_strhash(v->name));
        }
 
 /* static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) */
        {
        CONF_VALUE *v = (CONF_VALUE *)v_void;
        return((lh_strhash(v->section)<<2)^lh_strhash(v->name));
        }
 
 /* static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) */
-static int cmp_conf(void *a_void, void *b_void)
+static int cmp_conf(const void *a_void,const  void *b_void)
        {
        int i;
        CONF_VALUE *a = (CONF_VALUE *)a_void;
        {
        int i;
        CONF_VALUE *a = (CONF_VALUE *)a_void;