Use new-style system-id macros everywhere possible. I hope I haven't
[openssl.git] / crypto / err / err.c
index 48eed688a6afb30343cfc3fde920c397aeabd7b1..4f7a2ce4ac7c5988407830b220aedaff5a4e695b 100644 (file)
@@ -124,18 +124,18 @@ static LHASH *error_hash=NULL;
 static LHASH *thread_hash=NULL;
 
 /* static unsigned long err_hash(ERR_STRING_DATA *a); */
-static unsigned long err_hash(void *a_void);
+static unsigned long err_hash(const void *a_void);
 /* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); */
-static int err_cmp(void *a_void, void *b_void);
+static int err_cmp(const void *a_void, const void *b_void);
 /* static unsigned long pid_hash(ERR_STATE *pid); */
-static unsigned long pid_hash(void *pid_void);
+static unsigned long pid_hash(const void *pid_void);
 /* static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); */
-static int pid_cmp(void *a_void,void *pid_void);
+static int pid_cmp(const void *a_void,const void *pid_void);
 static unsigned long get_error_values(int inc,const char **file,int *line,
                                      const char **data,int *flags);
 
 static void ERR_STATE_free(ERR_STATE *s);
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
 static ERR_STRING_DATA ERR_str_libraries[]=
        {
 {ERR_PACK(ERR_LIB_NONE,0,0)            ,"unknown library"},
@@ -163,6 +163,7 @@ static ERR_STRING_DATA ERR_str_libraries[]=
 {ERR_PACK(ERR_LIB_RAND,0,0)            ,"random number generator"},
 {ERR_PACK(ERR_LIB_DSO,0,0)             ,"DSO support routines"},
 {ERR_PACK(ERR_LIB_ENGINE,0,0)          ,"engine routines"},
+{ERR_PACK(ERR_LIB_OCSP,0,0)            ,"OCSP routines"},
 {0,NULL},
        };
 
@@ -176,7 +177,7 @@ static ERR_STRING_DATA ERR_str_functs[]=
        {ERR_PACK(0,SYS_F_BIND,0),              "bind"},
        {ERR_PACK(0,SYS_F_LISTEN,0),            "listen"},
        {ERR_PACK(0,SYS_F_ACCEPT,0),            "accept"},
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        {ERR_PACK(0,SYS_F_WSASTARTUP,0),        "WSAstartup"},
 #endif
        {ERR_PACK(0,SYS_F_OPENDIR,0),           "opendir"},
@@ -305,7 +306,7 @@ void ERR_load_ERR_strings(void)
                        }
                CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
 
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,ERR_str_libraries);
                ERR_load_strings(0,ERR_str_reasons);
                ERR_load_strings(ERR_LIB_SYS,ERR_str_functs);
@@ -626,7 +627,7 @@ const char *ERR_reason_error_string(unsigned long e)
        }
 
 /* static unsigned long err_hash(ERR_STRING_DATA *a) */
-static unsigned long err_hash(void *a_void)
+static unsigned long err_hash(const void *a_void)
        {
        unsigned long ret,l;
 
@@ -636,20 +637,20 @@ static unsigned long err_hash(void *a_void)
        }
 
 /* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) */
-static int err_cmp(void *a_void, void *b_void)
+static int err_cmp(const void *a_void, const void *b_void)
        {
        return((int)(((ERR_STRING_DATA *)a_void)->error -
                        ((ERR_STRING_DATA *)b_void)->error));
        }
 
 /* static unsigned long pid_hash(ERR_STATE *a) */
-static unsigned long pid_hash(void *a_void)
+static unsigned long pid_hash(const void *a_void)
        {
        return(((ERR_STATE *)a_void)->pid*13);
        }
 
 /* static int pid_cmp(ERR_STATE *a, ERR_STATE *b) */
-static int pid_cmp(void *a_void, void *b_void)
+static int pid_cmp(const void *a_void, const void *b_void)
        {
        return((int)((long)((ERR_STATE *)a_void)->pid -
                        (long)((ERR_STATE *)b_void)->pid));