New option 'ctestall' for mkdef.pl, that makes it not only generate
existing functions, but really all functions that exist in libeay.num and ssleay.num. This is a good check on how much we should actually clean up the number files.
This commit is contained in:
@@ -13,6 +13,7 @@ my $do_update = 0;
|
|||||||
my $do_crypto = 0;
|
my $do_crypto = 0;
|
||||||
my $do_ssl = 0;
|
my $do_ssl = 0;
|
||||||
my $do_ctest = 0;
|
my $do_ctest = 0;
|
||||||
|
my $do_ctestall = 0;
|
||||||
my $rsaref = 0;
|
my $rsaref = 0;
|
||||||
|
|
||||||
my $W32=1;
|
my $W32=1;
|
||||||
@@ -49,6 +50,7 @@ foreach (@ARGV, split(/ /, $options))
|
|||||||
$do_crypto=1 if $_ eq "crypto";
|
$do_crypto=1 if $_ eq "crypto";
|
||||||
$do_update=1 if $_ eq "update";
|
$do_update=1 if $_ eq "update";
|
||||||
$do_ctest=1 if $_ eq "ctest";
|
$do_ctest=1 if $_ eq "ctest";
|
||||||
|
$do_ctestall=1 if $_ eq "ctestall";
|
||||||
$rsaref=1 if $_ eq "rsaref";
|
$rsaref=1 if $_ eq "rsaref";
|
||||||
#$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK";
|
#$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK";
|
||||||
|
|
||||||
@@ -148,7 +150,7 @@ if($do_crypto == 1) {
|
|||||||
close OUT;
|
close OUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
} elsif ($do_ctest) {
|
} elsif ($do_ctest || $do_ctestall) {
|
||||||
|
|
||||||
print <<"EOF";
|
print <<"EOF";
|
||||||
|
|
||||||
@@ -159,10 +161,10 @@ if($do_crypto == 1) {
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
&print_test_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func)
|
&print_test_file(*STDOUT,"SSLEAY",*ssl_list,$do_ctestall,@ssl_func)
|
||||||
if $do_ssl == 1;
|
if $do_ssl == 1;
|
||||||
|
|
||||||
&print_test_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func)
|
&print_test_file(*STDOUT,"LIBEAY",*crypto_list,$do_ctestall,@crypto_func)
|
||||||
if $do_crypto == 1;
|
if $do_crypto == 1;
|
||||||
|
|
||||||
print "}\n";
|
print "}\n";
|
||||||
@@ -417,22 +419,26 @@ sub do_defs
|
|||||||
|
|
||||||
sub print_test_file
|
sub print_test_file
|
||||||
{
|
{
|
||||||
(*OUT,my $name,*nums,my @functions)=@_;
|
(*OUT,my $name,*nums,my $all,my @functions)=@_;
|
||||||
my $n = 1; my @e; my @r;
|
my $n = 1; my @e; my @r;
|
||||||
my $func;
|
my $func; my $prev = "";
|
||||||
|
|
||||||
|
push(@functions, keys %nums) if $all;
|
||||||
(@e)=grep(/^SSLeay/,@functions);
|
(@e)=grep(/^SSLeay/,@functions);
|
||||||
(@r)=grep(!/^SSLeay/,@functions);
|
(@r)=grep(!/^SSLeay/,@functions);
|
||||||
@functions=((sort @e),(sort @r));
|
@functions=((sort @e),(sort @r));
|
||||||
|
|
||||||
foreach $func (@functions) {
|
foreach $func (@functions) {
|
||||||
if (!defined($nums{$func})) {
|
if ($func ne $prev) {
|
||||||
printf STDERR "$func does not have a number assigned\n"
|
if (!defined($nums{$func})) {
|
||||||
if(!$do_update);
|
printf STDERR "$func does not have a number assigned\n"
|
||||||
} else {
|
if(!$do_update);
|
||||||
$n=$nums{$func};
|
} else {
|
||||||
print OUT "\t$func();\n";
|
$n=$nums{$func};
|
||||||
|
print OUT "\t$func();\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$prev = $func; # To avoid duplicates...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user