X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmkstack.pl;h=f708610a7888d1a7fe4d9eeaf2426f462f785b87;hp=be2cb4f1e723fac84bb8bd534069fe1c23b3b10f;hb=1a70fe953a65a1b7ed3814c1bb415814f628ba44;hpb=26851b6b42260bdfd5c5b8332b5d3d00fa60f3df diff --git a/util/mkstack.pl b/util/mkstack.pl index be2cb4f1e7..f708610a78 100755 --- a/util/mkstack.pl +++ b/util/mkstack.pl @@ -21,7 +21,7 @@ while (@ARGV) { } -@source = (, , ); +@source = (, , , ); foreach $file (@source) { next if -l $file; @@ -31,11 +31,19 @@ foreach $file (@source) { while() { if (/^DECLARE_STACK_OF\(([^)]+)\)/) { push @stacklst, $1; - } if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) { + } + if (/^DECLARE_SPECIAL_STACK_OF\(([^,\s]+)\s*,\s*([^>\s]+)\)/) { + push @sstacklst, [$1, $2]; + } + if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) { push @asn1setlst, $1; - } if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) { + } + if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) { push @p12stklst, $1; } + if (/^DECLARE_LHASH_OF\(([^)]+)\)/) { + push @lhashlst, $1; + } } close(IN); } @@ -65,7 +73,7 @@ while() { foreach $type_thing (sort @stacklst) { $new_stackfile .= <) { #define sk_${type_thing}_shift(st) SKM_sk_shift($type_thing, (st)) #define sk_${type_thing}_pop(st) SKM_sk_pop($type_thing, (st)) #define sk_${type_thing}_sort(st) SKM_sk_sort($type_thing, (st)) +#define sk_${type_thing}_is_sorted(st) SKM_sk_is_sorted($type_thing, (st)) +EOF + } + + foreach $type_thing (sort @sstacklst) { + my $t1 = $type_thing->[0]; + my $t2 = $type_thing->[1]; + $new_stackfile .= <