X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmkstack.pl;h=2bd96cd0c1ea81532331590a59dd533d00ef2ff9;hp=be2cb4f1e723fac84bb8bd534069fe1c23b3b10f;hb=70857a4a004dd10345e6c8397734bda4dc4bdad7;hpb=26851b6b42260bdfd5c5b8332b5d3d00fa60f3df diff --git a/util/mkstack.pl b/util/mkstack.pl index be2cb4f1e7..2bd96cd0c1 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}_set_cmp_func(st, cmp) SKM_sk_set_cmp_func($type_thing, (st), (cmp)) #define sk_${type_thing}_dup(st) SKM_sk_dup($type_thing, st) #define sk_${type_thing}_pop_free(st, free_func) SKM_sk_pop_free($type_thing, (st), (free_func)) +#define sk_${type_thing}_deep_copy(st, copy_func, free_func) SKM_sk_deep_copy($type_thing, (st), (copy_func), (free_func)) #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 .= <