From 47a9d527aba6704cf57b9d0d18781cd55f2fc3be Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 21 Nov 2006 21:29:44 +0000 Subject: Update from 0.9.8 stable. Eliminate duplicate error codes. --- util/mkerr.pl | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'util') diff --git a/util/mkerr.pl b/util/mkerr.pl index d8053b092f..d1e9a2b948 100644 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -139,6 +139,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; @@ -151,6 +153,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) { @@ -453,10 +458,17 @@ EOF if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) { $err_reason_strings{$1} = $2; } + if (/\b${lib}_F_(\w*)\b.*\"(.*)\"/) { + if (!exists $ftrans{$1} && ($1 ne $2)) { + print STDERR "WARNING: Mismatched function string $2\n"; + $ftrans{$1} = $2; + } + } } close(IN); } + my $hincf; if($static) { $hfile =~ /([^\/]+)$/; @@ -485,7 +497,7 @@ EOF print OUT <<"EOF"; /* $cfile */ /* ==================================================================== - * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2006 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 @@ -599,17 +611,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 { -- cgit v1.2.3