diff options
author | Richard Levitte <levitte@openssl.org> | 2019-11-04 10:33:10 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-11-05 22:44:21 +0100 |
commit | e4f2d539f631060654faf3b45f54e222637109ac (patch) | |
tree | 2ff41534ab3b2b49d56b06f36dccd3fd92a9ef01 /util | |
parent | a4aab7871939d3661557fd843e0d411bbaa78bc6 (diff) |
util/mkdef.pl: writer_VMS(): handle symbols with no assigned number
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10348)
Diffstat (limited to 'util')
-rwxr-xr-x | util/mkdef.pl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl index a860db601d..11471499df 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -323,7 +323,10 @@ sub writer_VMS { my $last_num = 0; foreach (@_) { - while (++$last_num < $_->number()) { + my $this_num = $_->number(); + $this_num = $last_num + 1 if $this_num =~ m|^\?|; + + while (++$last_num < $this_num) { push @slot_collection, $collector->(); # Just occupy a slot } my $type = { @@ -406,12 +409,20 @@ int main() { _____ + my $last_num = 0; for (@_) { + my $this_num = $_->number(); + $this_num = $last_num + 1 if $this_num =~ m|^\?|; + if ($_->type() eq 'VARIABLE') { - print "\textern int ", $_->name(), '; /* type unknown */ /* ', $_->number(), ' ', $_->version(), " */\n"; + print "\textern int ", $_->name(), '; /* type unknown */ /* ', + $this_num, ' ', $_->version(), " */\n"; } else { - print "\textern int ", $_->name(), '(); /* type unknown */ /* ', $_->number(), ' ', $_->version(), " */\n"; + print "\textern int ", $_->name(), '(); /* type unknown */ /* ', + $this_num, ' ', $_->version(), " */\n"; } + + $last_num = $this_num; } print <<'_____'; } |