foreach (sort keys %out)
{
- print "static ERR_STRING_DATA ${_}[]=\n\t{\n";
+ print "static ERR_STRING_DATA ${_}\[\]=\n\t{\n";
print $out{$_};
print "{0,NULL},\n";
print "\t};\n\n";
if ($static)
{ $lib="ERR_LIB_$type"; }
else
- { $lib="${type}_lib_error_code"; }
+ {
+ print <<"EOF";
+
+#ifdef ${type}_LIB_NAME
+static ERR_STRING_DATA ${type}_lib_name[]=
+ {
+{0 ,${type}_LIB_NAME},
+{0,NULL}
+ };
+#endif
+
+EOF
+ $lib="${type}_lib_error_code";
+
+
+
+ }
$str="";
$str.="#ifndef NO_ERR\n";
{
print <<"EOF";
-static int ${type}_lib_error_code=0;
+int ${type}_lib_error_code=0;
void ERR_load_${type}_strings()
{
{
init=0;
$str
+#ifdef ${type}_LIB_NAME
+ ${type}_lib_name->error = ERR_PACK(${type}_lib_error_code,0,0);
+ ERR_load_strings(0,${type}_lib_name);
+#endif;
}
}
EOF
print "#include <stdio.h>\n";
- print "#include \"err.h\"\n";
- print "#include \"$header\"\n";
+ print "#include <openssl/err.h>\n";
+ print "#include <openssl/$header>\n";
print "\n/* BEGIN ERROR CODES */\n";
print "#ifndef NO_ERR\n";
}