summaryrefslogtreecommitdiffstats
path: root/util/mkdef.pl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-04-05 17:06:01 +0200
committerRichard Levitte <levitte@openssl.org>2017-04-10 12:11:00 +0200
commit676cc3a67faf8170be910c2149d65616697cb126 (patch)
treeef18e07186fd1bebd63146ab78efecf86006e005 /util/mkdef.pl
parent6a32a3c058dbd9fa7cec5b020e4f027808972e4a (diff)
Act on deprecation of LONG and ZLONG, step 3
Teach util/mkdef.pl to recognise these lines: #if OPENSSL_API_COMPAT < 0xXXXXXXXXL #if OPENSSL_API_COMPAT >= 0xXXXXXXXXL and add corresponding markers in util/*.num A final 'make update' sets those markers right for LONG and ZLONG. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3126)
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-xutil/mkdef.pl22
1 files changed, 21 insertions, 1 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 6bc23b1e8e..41992f57c2 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -114,6 +114,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
"DEPRECATEDIN_0_9_8",
"DEPRECATEDIN_1_0_0",
"DEPRECATEDIN_1_1_0",
+ "DEPRECATEDIN_1_2_0",
# SCTP
"SCTP",
# SRTP
@@ -394,6 +395,7 @@ sub do_defs
(map { "OPENSSL_SYS_".$_ => 0 } @known_ossl_platforms),
(map { "OPENSSL_NO_".$_ => 0 } @known_algorithms),
(map { "OPENSSL_USE_".$_ => 0 } @known_algorithms),
+ (grep /^DEPRECATED_/, @known_algorithms),
NOPROTO => 0,
PERL5 => 0,
_WINDLL => 0,
@@ -506,7 +508,22 @@ sub do_defs
s/{[^{}]*}//gs; # ignore {} blocks
print STDERR "DEBUG: \$def=\"$def\"\n" if $debug && $def ne "";
print STDERR "DEBUG: \$_=\"$_\"\n" if $debug;
- if (/^\#\s*ifndef\s+(.*)/) {
+ if (/^\#\s*if\s+OPENSSL_API_COMPAT\s*(\S)\s*(0x[0-9a-fA-F]{8})L\s*$/) {
+ my $op = $1;
+ my $v = hex($2);
+ if ($op ne '<' && $op ne '>=') {
+ die "$file unacceptable operator $op: $_\n";
+ }
+ my ($one, $major, $minor) =
+ ( ($v >> 28) & 0xf,
+ ($v >> 20) & 0xff,
+ ($v >> 12) & 0xff );
+ my $t = "DEPRECATEDIN_${one}_${major}_${minor}";
+ push(@tag,"-");
+ push(@tag,$t);
+ $tag{$t}=($op eq '<' ? 1 : -1);
+ print STDERR "DEBUG: $file: found tag $t = $tag{$t}\n" if $debug;
+ } elsif (/^\#\s*ifndef\s+(.*)/) {
push(@tag,"-");
push(@tag,$1);
$tag{$1}=-1;
@@ -637,6 +654,9 @@ sub do_defs
, grep(!/^$/,
map { $tag{"OPENSSL_USE_".$_} == 1 ? $_ : "" }
@known_algorithms);
+ push @current_algorithms,
+ grep { /^DEPRECATEDIN_/ && $tag{$_} == 1 }
+ @known_algorithms;
$def .=
"#INFO:"
.join(',',@current_platforms).":"