Rebuild error codes.
[openssl.git] / crypto / buffer / buf_err.c
index 7f9fd1f6c367b3f5cf3e21cbdb53aff6e731fdf6..b433f5c81454423449aee9b032853bc1d23c43b4 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/buffer/buf_err.c */
 /* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -54,7 +54,8 @@
  */
 
 /* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file.
+ * made to it will be overwritten when the script next updates this file,
+ * only reason strings will be preserved.
  */
 
 #include <stdio.h>
 #include <openssl/buffer.h>
 
 /* BEGIN ERROR CODES */
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
+
+#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0)
+#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BUF,0,reason)
+
 static ERR_STRING_DATA BUF_str_functs[]=
        {
-{ERR_PACK(0,BUF_F_BUF_MEM_GROW,0),     "BUF_MEM_grow"},
-{ERR_PACK(0,BUF_F_BUF_MEM_NEW,0),      "BUF_MEM_new"},
-{ERR_PACK(0,BUF_F_BUF_STRDUP,0),       "BUF_strdup"},
+{ERR_FUNC(BUF_F_BUF_MEMDUP),   "BUF_memdup"},
+{ERR_FUNC(BUF_F_BUF_MEM_GROW), "BUF_MEM_grow"},
+{ERR_FUNC(BUF_F_BUF_MEM_NEW),  "BUF_MEM_new"},
+{ERR_FUNC(BUF_F_BUF_STRDUP),   "BUF_strdup"},
+{ERR_FUNC(BUF_F_BUF_STRNDUP),  "BUF_strndup"},
 {0,NULL}
        };
 
@@ -85,9 +92,9 @@ void ERR_load_BUF_strings(void)
        if (init)
                {
                init=0;
-#ifndef NO_ERR
-               ERR_load_strings(ERR_LIB_BUF,BUF_str_functs);
-               ERR_load_strings(ERR_LIB_BUF,BUF_str_reasons);
+#ifndef OPENSSL_NO_ERR
+               ERR_load_strings(0,BUF_str_functs);
+               ERR_load_strings(0,BUF_str_reasons);
 #endif
 
                }