summaryrefslogtreecommitdiffstats
path: root/util/mkerr.pl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-11-21 21:29:44 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-11-21 21:29:44 +0000
commit47a9d527aba6704cf57b9d0d18781cd55f2fc3be (patch)
treed24c81f5921d464dba644ff371cad27568c4d639 /util/mkerr.pl
parentd9907c972b8394f13388289284db13e5bb38ca54 (diff)
Update from 0.9.8 stable. Eliminate duplicate error codes.
Diffstat (limited to 'util/mkerr.pl')
-rw-r--r--util/mkerr.pl23
1 files changed, 16 insertions, 7 deletions
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 {