X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util%2Fmkerr.pl;h=554bebb1590126e72d56bb52cade806a2a9e3740;hb=1dfa26bd84cdd4844fd4b7e6a472d0730a6dd824;hp=399b10e1a338081e71fa8bdce2af0e8552fef18b;hpb=8dc7450068c7bb218ad8d1e66ad733d0a5b3c209;p=oweals%2Fopenssl.git diff --git a/util/mkerr.pl b/util/mkerr.pl index 399b10e1a3..554bebb159 100644 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -44,7 +44,8 @@ while (@ARGV) { } if($recurse) { - @source = (, , ); + @source = ( , , , + , ); } 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 {