get rid of OpenSSLDie
[openssl.git] / util / mkerr.pl
index 7dbe24629722df2c87992ad4dbc245527c606fcc..449aa57bbaf08825203bd8696a00b010d3771c38 100644 (file)
@@ -38,7 +38,7 @@ while (@ARGV) {
 }
 
 if($recurse) {
-       @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>);
+       @source = (<crypto/*.c>, <crypto/*/*.c>, <rsaref/*.c>, <ssl/*.c>);
 } else {
        @source = @ARGV;
 }
@@ -53,6 +53,7 @@ while(<IN>)
 {
        if(/^L\s+(\S+)\s+(\S+)\s+(\S+)/) {
                $hinc{$1} = $2;
+               $libinc{$2} = $1;
                $cskip{$3} = $1;
                if($3 ne "NONE") {
                        $csrc{$1} = $3;
@@ -74,7 +75,7 @@ close IN;
 # Scan each header file in turn and make a list of error codes
 # and function names
 
-while (($lib, $hdr) = each %hinc)
+while (($hdr, $lib) = each %libinc)
 {
        next if($hdr eq "NONE");
        print STDERR "Scanning header file $hdr\n" if $debug; 
@@ -319,7 +320,7 @@ EOF
        print OUT <<"EOF";
 /* $cfile */
 /* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2002 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
@@ -382,7 +383,7 @@ EOF
 #include $hincf
 
 /* BEGIN ERROR CODES */
-#ifndef OPENSSL_NO_ERR
+#ifndef NO_ERR
 static ERR_STRING_DATA ${lib}_str_functs[]=
        {
 EOF
@@ -432,7 +433,7 @@ void ERR_load_${lib}_strings(void)
        if (init)
                {
                init=0;
-#ifndef OPENSSL_NO_ERR
+#ifndef NO_ERR
                ERR_load_strings(ERR_LIB_${lib},${lib}_str_functs);
                ERR_load_strings(ERR_LIB_${lib},${lib}_str_reasons);
 #endif
@@ -468,7 +469,7 @@ void ERR_load_${lib}_strings(void)
        if (init)
                {
                init=0;
-#ifndef OPENSSL_NO_ERR
+#ifndef NO_ERR
                ERR_load_strings(${lib}_lib_error_code,${lib}_str_functs);
                ERR_load_strings(${lib}_lib_error_code,${lib}_str_reasons);
 #endif