Ooops, missing close quote
[oweals/openssl.git] / util / mkerr.pl
index 399b10e1a338081e71fa8bdce2af0e8552fef18b..554bebb1590126e72d56bb52cade806a2a9e3740 100644 (file)
@@ -44,7 +44,8 @@ while (@ARGV) {
 }
 
 if($recurse) {
-       @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>);
+       @source = ( <crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>,
+                       <fips/*.c>, <fips/*/*.c>);
 } else {
        @source = @ARGV;
 }
@@ -135,6 +136,8 @@ while (($hdr, $lib) = each %libinc)
 
        print STDERR "                                  \r" if $debug;
         $defnr = 0;
+       # Delete any DECLARE_ macros
+       $def =~ s/DECLARE_\w+\([\w,\s]+\)//gs;
        foreach (split /;/, $def) {
            $defnr++;
            print STDERR "def: $defnr\r" if $debug;
@@ -147,6 +150,9 @@ while (($hdr, $lib) = each %libinc)
            # Skip over recognized non-function declarations
            next if(/typedef\W/ or /DECLARE_STACK_OF/ or /TYPEDEF_.*_OF/);
 
+           # Remove STACK_OF(foo)
+           s/STACK_OF\(\w+\)/void/;
+
            # Reduce argument lists to empty ()
            # fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {}
            while(/\(.*\)/s) {
@@ -307,7 +313,7 @@ foreach $lib (keys %csrc)
        } else {
            push @out,
 "/* ====================================================================\n",
-" * Copyright (c) 2001-2005 The OpenSSL Project.  All rights reserved.\n",
+" * Copyright (c) 2001-2008 The OpenSSL Project.  All rights reserved.\n",
 " *\n",
 " * Redistribution and use in source and binary forms, with or without\n",
 " * modification, are permitted provided that the following conditions\n",
@@ -481,7 +487,7 @@ EOF
        print OUT <<"EOF";
 /* $cfile */
 /* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2008 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
@@ -595,17 +601,14 @@ if($static) {
 
 ${staticloader}void ERR_load_${lib}_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(${lib}_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings($load_errcode,${lib}_str_functs);
                ERR_load_strings($load_errcode,${lib}_str_reasons);
-#endif
-
                }
+#endif
        }
 EOF
 } else {