util/mkdef.pl: Make symbol version processing Linux only
authorRichard Levitte <levitte@openssl.org>
Thu, 29 Jun 2017 19:11:48 +0000 (21:11 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 29 Jun 2017 19:19:53 +0000 (21:19 +0200)
For Windows, we care which way it is, the resulting file is just a pile
of symbols.  For VMS, we really need to care about the numeric ordering,
and getting the symbols sorted by symbol version too didn't agree with
that.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3804)

util/mkdef.pl

index dc39be4..cc2fef7 100755 (executable)
@@ -1213,7 +1213,6 @@ EOF
                                        if(!$do_update);
                        } else {
                                (my $n, my $symversion, my $dummy) = split /\\/, $nums{$s};
                                        if(!$do_update);
                        } else {
                                (my $n, my $symversion, my $dummy) = split /\\/, $nums{$s};
-                               next if $symversion ne $thisversion;
                                my %pf = ();
                                my $p = ($i =~ /^[^:]*:([^:]*):/,$1);
                                my $a = ($i =~ /^[^:]*:[^:]*:[^:]*:([^:]*)/,$1);
                                my %pf = ();
                                my $p = ($i =~ /^[^:]*:([^:]*):/,$1);
                                my $a = ($i =~ /^[^:]*:[^:]*:[^:]*:([^:]*)/,$1);
@@ -1226,6 +1225,7 @@ EOF
                                        }
                                        $prev = $s2;    # To warn about duplicates...
                                        if($linux) {
                                        }
                                        $prev = $s2;    # To warn about duplicates...
                                        if($linux) {
+                                               next if $symversion ne $thisversion;
                                                if ($symversion ne $prevsymversion) {
                                                        if ($prevsymversion ne "") {
                                                                if ($prevprevsymversion ne "") {
                                                if ($symversion ne $prevsymversion) {
                                                        if ($prevsymversion ne "") {
                                                                if ($prevprevsymversion ne "") {
@@ -1281,7 +1281,7 @@ EOF
                                }
                        }
                }
                                }
                        }
                }
-       } while ($thisversion ne $currversion);
+       } while ($linux && $thisversion ne $currversion);
        if ($linux) {
                if ($prevprevsymversion ne "") {
                        print OUT "    local: *;\n} OPENSSL_$prevprevsymversion;\n\n";
        if ($linux) {
                if ($prevprevsymversion ne "") {
                        print OUT "    local: *;\n} OPENSSL_$prevprevsymversion;\n\n";