X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmkdef.pl;h=a860db601d55105a77a54cc1b5fa8a146bc5bea7;hp=eac4f50a1770e22ba009d170a6aaaa60038c2ff4;hb=9c45222ddc36124b8826d98dc0794f3eef1e5f0b;hpb=3a63dbef15b62b121c5df8762f8cb915fb06b27a diff --git a/util/mkdef.pl b/util/mkdef.pl index eac4f50a17..a860db601d 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -1,7 +1,7 @@ #! /usr/bin/env perl # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -21,6 +21,10 @@ use OpenSSL::Ordinals; use lib '.'; use configdata; +use File::Spec::Functions; +use lib catdir($config{sourcedir}, 'Configurations'); +use platform; + my $name = undef; # internal library/module name my $ordinals_file = undef; # the ordinals file to use my $version = undef; # the version to use for the library @@ -100,29 +104,25 @@ my $apiv = undef; $apiv = sprintf "%x%02x%02x", split(/\./, $config{api}) if $config{api}; -my $libname = $unified_info{sharednames}->{$name} // $name; +my $libname = platform->sharedname($name); my %OS_data = ( solaris => { writer => \&writer_linux, sort => sorter_linux(), - platforms => { UNIX => 1, - EXPORT_VAR_AS_FUNCTION => 0 } }, + platforms => { UNIX => 1 } }, linux => 'solaris', # alias "bsd-gcc" => 'solaris', # alias aix => { writer => \&writer_aix, sort => sorter_unix(), - platforms => { UNIX => 1, - EXPORT_VAR_AS_FUNCTION => 0 } }, + platforms => { UNIX => 1 } }, VMS => { writer => \&writer_VMS, sort => OpenSSL::Ordinals::by_number(), - platforms => { VMS => 1, - EXPORT_VAR_AS_FUNCTION => 0 } }, + platforms => { VMS => 1 } }, vms => 'VMS', # alias WINDOWS => { writer => \&writer_windows, sort => OpenSSL::Ordinals::by_name(), platforms => { WIN32 => 1, - _WIN32 => 1, - EXPORT_VAR_AS_FUNCTION => 1 } }, + _WIN32 => 1 } }, windows => 'WINDOWS', # alias WIN32 => 'WINDOWS', # alias win32 => 'WIN32', # alias @@ -386,9 +386,11 @@ _____ _____ if (defined $version) { - my ($libvmajor, $libvminor) = $version =~ /^(\d+)_(\d+)$/; + $version =~ /^(\d+)\.(\d+)\.(\d+)/; + my $libvmajor = $1; + my $libvminor = $2 * 100 + $3; print <<"_____"; -GSMATCH=LEQUAL,$libvmajor,$libvminor; +GSMATCH=LEQUAL,$libvmajor,$libvminor _____ } }