summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/mkdef.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/mkdef.pl')
-rw-r--r--src/lib/libcrypto/util/mkdef.pl38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl
index cdd2164c4e..01a1bfda19 100644
--- a/src/lib/libcrypto/util/mkdef.pl
+++ b/src/lib/libcrypto/util/mkdef.pl
@@ -1116,27 +1116,55 @@ sub print_test_file
1116 } 1116 }
1117} 1117}
1118 1118
1119sub get_version {
1120 local *MF;
1121 my $v = '?';
1122 open MF, 'Makefile.ssl' or return $v;
1123 while (<MF>) {
1124 $v = $1, last if /^VERSION=(.*?)\s*$/;
1125 }
1126 close MF;
1127 return $v;
1128}
1129
1119sub print_def_file 1130sub print_def_file
1120{ 1131{
1121 (*OUT,my $name,*nums,my @symbols)=@_; 1132 (*OUT,my $name,*nums,my @symbols)=@_;
1122 my $n = 1; my @e; my @r; my @v; my $prev=""; 1133 my $n = 1; my @e; my @r; my @v; my $prev="";
1123 my $liboptions=""; 1134 my $liboptions="";
1135 my $libname = $name;
1136 my $http_vendor = 'www.openssl.org/';
1137 my $version = get_version();
1138 my $what = "OpenSSL: implementation of Secure Socket Layer";
1139 my $description = "$what $version, $name - http://$http_vendor";
1124 1140
1125 if ($W32) 1141 if ($W32)
1126 { $name.="32"; } 1142 { $libname.="32"; }
1127 elsif ($W16) 1143 elsif ($W16)
1128 { $name.="16"; } 1144 { $libname.="16"; }
1129 elsif ($OS2) 1145 elsif ($OS2)
1130 { $liboptions = "INITINSTANCE\nDATA NONSHARED"; } 1146 { # DLL names should not clash on the whole system.
1147 # However, they should not have any particular relationship
1148 # to the name of the static library. Chose descriptive names
1149 # (must be at most 8 chars).
1150 my %translate = (ssl => 'open_ssl', crypto => 'cryptssl');
1151 $libname = $translate{$name} || $name;
1152 $liboptions = <<EOO;
1153INITINSTANCE
1154DATA MULTIPLE NONSHARED
1155EOO
1156 # Vendor field can't contain colon, drat; so we omit http://
1157 $description = "\@#$http_vendor:$version#\@$what; DLL for library $name. Build for EMX -Zmtd";
1158 }
1131 1159
1132 print OUT <<"EOF"; 1160 print OUT <<"EOF";
1133; 1161;
1134; Definition file for the DLL version of the $name library from OpenSSL 1162; Definition file for the DLL version of the $name library from OpenSSL
1135; 1163;
1136 1164
1137LIBRARY $name $liboptions 1165LIBRARY $libname $liboptions
1138 1166
1139DESCRIPTION 'OpenSSL $name - http://www.openssl.org/' 1167DESCRIPTION '$description'
1140 1168
1141EOF 1169EOF
1142 1170