Commit ab1e5495 authored by Richard Levitte's avatar Richard Levitte
Browse files

Move ZLIB from 'platforms' to 'features'



Having it as a 'platform' was conceptually wrong from from the
beginning, and makes decoding more complicated than necessary.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7191)
parent 8effd8fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2529,7 +2529,7 @@ ASN1_STRING_type_new 2494 1_1_0 EXIST::FUNCTION:
TS_STATUS_INFO_free                     2495	1_1_0	EXIST::FUNCTION:TS
BN_mod_mul                              2496	1_1_0	EXIST::FUNCTION:
CMS_add0_recipient_key                  2497	1_1_0	EXIST::FUNCTION:CMS
BIO_f_zlib                              2498	1_1_0	EXIST:ZLIB:FUNCTION:COMP
BIO_f_zlib                              2498	1_1_0	EXIST::FUNCTION:COMP,ZLIB
AES_cfb128_encrypt                      2499	1_1_0	EXIST::FUNCTION:
ENGINE_set_EC                           2500	1_1_0	EXIST::FUNCTION:ENGINE
d2i_ECPKParameters                      2501	1_1_0	EXIST::FUNCTION:EC
+2 −5
Original line number Diff line number Diff line
@@ -176,15 +176,12 @@ sub platform_filter {

sub feature_filter {
    my $item = shift;
    my %platforms = ( $item->platforms() );
    my @features = ( $item->features() );

    # True if no features are defined
    return 1 if scalar @features == 0 && scalar keys %platforms == 0;
    return 1 if scalar @features == 0;

    my $verdict =
        !( ( grep { $disabled_uc{$_} } @features )
           || ( grep { $_ eq 'ZLIB' && $disabled_uc{$_} } keys %platforms ) );
    my $verdict = ! grep { $disabled_uc{$_} } @features;

    if ($apiv) {
        foreach (@features) {
+5 −3
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ my $aix=0;
my $safe_stack_def = 0;

my @known_platforms = ( "__FreeBSD__", "PERL5",
			"EXPORT_VAR_AS_FUNCTION", "ZLIB", "_WIN32"
			"EXPORT_VAR_AS_FUNCTION", "_WIN32"
			);
my @known_ossl_platforms = ( "UNIX", "VMS", "WIN32", "WINNT", "OS2" );
my @known_algorithms = ( # These are algorithms we know are guarded in relevant
@@ -267,6 +267,7 @@ sub do_defs
			_WINDLL		=> 0,
			CONST_STRICT	=> 0,
			TRUE		=> 1,
			ZLIB		=> 0,
		);
		my $symhacking = $file eq $symhacksfile;
		my @current_platforms = ();
@@ -524,6 +525,8 @@ sub do_defs
				push @current_algorithms,
				    grep { /^DEPRECATEDIN_/ && $tag{$_} == 1 }
				    @known_algorithms;
				push @current_algorithms, "ZLIB"
				    if $tag{ZLIB} == 1;
				$def .=
				    "#INFO:"
					.join(',',@current_platforms).":"
@@ -994,12 +997,11 @@ sub is_valid
			if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && $W32) {
				return 1;
			}
			if ($keyword eq "ZLIB" && $zlib) { return 1; }
			return 0;
		} else {
			# algorithms
			if ($disabled_algorithms{$keyword}) { return 0;}

			if ($keyword eq "ZLIB" && $zlib) { return 1; }
			# Nothing recognise as true
			return 1;
		}