When inside a #if 0..#endif, do not define anything.
This commit is contained in:
parent
e3ef8d2e6b
commit
2ae87d465e
215
util/mkdef.pl
215
util/mkdef.pl
@ -452,7 +452,7 @@ sub do_defs
|
|||||||
$tag{"TRUE"}=-1;
|
$tag{"TRUE"}=-1;
|
||||||
print STDERR "DEBUG: $file: found 0\n" if $debug;
|
print STDERR "DEBUG: $file: found 0\n" if $debug;
|
||||||
} elsif (/^\#\s*define\s+(\w+)\s+(\w+)/
|
} elsif (/^\#\s*define\s+(\w+)\s+(\w+)/
|
||||||
&& $symhacking) {
|
&& $symhacking && $tag{'TRUE'} != -1) {
|
||||||
my $s = $1;
|
my $s = $1;
|
||||||
my $a = $2;
|
my $a = $2;
|
||||||
my $a1 = join(",",
|
my $a1 = join(",",
|
||||||
@ -491,95 +491,95 @@ sub do_defs
|
|||||||
.join(',',@current_algorithms).";";
|
.join(',',@current_algorithms).";";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
|
if ($tag{'TRUE'} != -1) {
|
||||||
next;
|
if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
|
||||||
} elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
next;
|
||||||
$def .= "int d2i_$3(void);";
|
} elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
||||||
$def .= "int i2d_$3(void);";
|
$def .= "int d2i_$3(void);";
|
||||||
$def .= "OPENSSL_EXTERN int $2_it;";
|
$def .= "int i2d_$3(void);";
|
||||||
next;
|
$def .= "OPENSSL_EXTERN int $2_it;";
|
||||||
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS_fname\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
next;
|
||||||
$def .= "int d2i_$3(void);";
|
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS_fname\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
||||||
$def .= "int i2d_$3(void);";
|
$def .= "int d2i_$3(void);";
|
||||||
$def .= "int $3_free(void);";
|
$def .= "int i2d_$3(void);";
|
||||||
$def .= "int $3_new(void);";
|
$def .= "int $3_free(void);";
|
||||||
$def .= "OPENSSL_EXTERN int $2_it;";
|
$def .= "int $3_new(void);";
|
||||||
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS\s*\(\s*(\w*)\s*\)/ ||
|
$def .= "OPENSSL_EXTERN int $2_it;";
|
||||||
/^\s*DECLARE_ASN1_FUNCTIONS_const\s*\(\s*(\w*)\s*\)/) {
|
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS\s*\(\s*(\w*)\s*\)/ ||
|
||||||
$def .= "int d2i_$1(void);";
|
/^\s*DECLARE_ASN1_FUNCTIONS_const\s*\(\s*(\w*)\s*\)/) {
|
||||||
$def .= "int i2d_$1(void);";
|
$def .= "int d2i_$1(void);";
|
||||||
$def .= "int $1_free(void);";
|
$def .= "int i2d_$1(void);";
|
||||||
$def .= "int $1_new(void);";
|
$def .= "int $1_free(void);";
|
||||||
$def .= "OPENSSL_EXTERN int $1_it;";
|
$def .= "int $1_new(void);";
|
||||||
next;
|
$def .= "OPENSSL_EXTERN int $1_it;";
|
||||||
} elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS_const\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
next;
|
||||||
$def .= "int d2i_$2(void);";
|
} elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS_const\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
||||||
$def .= "int i2d_$2(void);";
|
$def .= "int d2i_$2(void);";
|
||||||
$def .= "OPENSSL_EXTERN int $2_it;";
|
$def .= "int i2d_$2(void);";
|
||||||
next;
|
$def .= "OPENSSL_EXTERN int $2_it;";
|
||||||
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
next;
|
||||||
$def .= "int d2i_$2(void);";
|
} elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) {
|
||||||
$def .= "int i2d_$2(void);";
|
$def .= "int d2i_$2(void);";
|
||||||
$def .= "int $2_free(void);";
|
$def .= "int i2d_$2(void);";
|
||||||
$def .= "int $2_new(void);";
|
$def .= "int $2_free(void);";
|
||||||
$def .= "OPENSSL_EXTERN int $2_it;";
|
$def .= "int $2_new(void);";
|
||||||
next;
|
$def .= "OPENSSL_EXTERN int $2_it;";
|
||||||
} elsif (/^\s*DECLARE_ASN1_ITEM\s*\(\s*(\w*)\s*,(\w*)\s*\)/) {
|
next;
|
||||||
$def .= "OPENSSL_EXTERN int $1_it;";
|
} elsif (/^\s*DECLARE_ASN1_ITEM\s*\(\s*(\w*)\s*,(\w*)\s*\)/) {
|
||||||
next;
|
$def .= "OPENSSL_EXTERN int $1_it;";
|
||||||
} elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) {
|
next;
|
||||||
next;
|
} elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) {
|
||||||
} elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
|
next;
|
||||||
next;
|
} elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
|
||||||
} elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ ||
|
next;
|
||||||
/^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) {
|
} elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ ||
|
||||||
# Things not in Win16
|
/^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) {
|
||||||
$def .=
|
# Things not in Win16
|
||||||
"#INFO:"
|
$def .=
|
||||||
.join(',',"!WIN16",@current_platforms).":"
|
"#INFO:"
|
||||||
.join(',',@current_algorithms).";";
|
.join(',',"!WIN16",@current_platforms).":"
|
||||||
$def .= "int PEM_read_$1(void);";
|
.join(',',@current_algorithms).";";
|
||||||
$def .= "int PEM_write_$1(void);";
|
$def .= "int PEM_read_$1(void);";
|
||||||
$def .=
|
$def .= "int PEM_write_$1(void);";
|
||||||
"#INFO:"
|
$def .=
|
||||||
.join(',',@current_platforms).":"
|
"#INFO:"
|
||||||
.join(',',@current_algorithms).";";
|
.join(',',@current_platforms).":"
|
||||||
# Things that are everywhere
|
.join(',',@current_algorithms).";";
|
||||||
$def .= "int PEM_read_bio_$1(void);";
|
# Things that are everywhere
|
||||||
$def .= "int PEM_write_bio_$1(void);";
|
$def .= "int PEM_read_bio_$1(void);";
|
||||||
} elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ ||
|
$def .= "int PEM_write_bio_$1(void);";
|
||||||
/^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) {
|
next;
|
||||||
# Things not in Win16
|
} elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ ||
|
||||||
$def .=
|
/^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) {
|
||||||
"#INFO:"
|
# Things not in Win16
|
||||||
.join(',',"!WIN16",@current_platforms).":"
|
$def .=
|
||||||
.join(',',@current_algorithms).";";
|
"#INFO:"
|
||||||
$def .= "int PEM_write_$1(void);";
|
.join(',',"!WIN16",@current_platforms).":"
|
||||||
$def .=
|
.join(',',@current_algorithms).";";
|
||||||
"#INFO:"
|
$def .= "int PEM_write_$1(void);";
|
||||||
.join(',',@current_platforms).":"
|
$def .=
|
||||||
.join(',',@current_algorithms).";";
|
"#INFO:"
|
||||||
# Things that are everywhere
|
.join(',',@current_platforms).":"
|
||||||
$def .= "int PEM_write_bio_$1(void);";
|
.join(',',@current_algorithms).";";
|
||||||
} elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ ||
|
# Things that are everywhere
|
||||||
/^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) {
|
$def .= "int PEM_write_bio_$1(void);";
|
||||||
# Things not in Win16
|
next;
|
||||||
$def .=
|
} elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ ||
|
||||||
"#INFO:"
|
/^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) {
|
||||||
.join(',',"!WIN16",@current_platforms).":"
|
# Things not in Win16
|
||||||
.join(',',@current_algorithms).";";
|
$def .=
|
||||||
$def .= "int PEM_read_$1(void);";
|
"#INFO:"
|
||||||
$def .=
|
.join(',',"!WIN16",@current_platforms).":"
|
||||||
"#INFO:"
|
.join(',',@current_algorithms).";";
|
||||||
.join(',',@current_platforms).":"
|
$def .= "int PEM_read_$1(void);";
|
||||||
.join(',',@current_algorithms).";";
|
$def .=
|
||||||
# Things that are everywhere
|
"#INFO:"
|
||||||
$def .= "int PEM_read_bio_$1(void);";
|
.join(',',@current_platforms).":"
|
||||||
} elsif (
|
.join(',',@current_algorithms).";";
|
||||||
($tag{'TRUE'} != -1)
|
# Things that are everywhere
|
||||||
&& ($tag{'CONST_STRICT'} != 1)
|
$def .= "int PEM_read_bio_$1(void);";
|
||||||
)
|
next;
|
||||||
{
|
} elsif ($tag{'CONST_STRICT'} != 1) {
|
||||||
if (/\{|\/\*|\([^\)]*$/) {
|
if (/\{|\/\*|\([^\)]*$/) {
|
||||||
$line = $_;
|
$line = $_;
|
||||||
} else {
|
} else {
|
||||||
@ -587,6 +587,7 @@ sub do_defs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close(IN);
|
close(IN);
|
||||||
|
|
||||||
my $algs;
|
my $algs;
|
||||||
@ -670,6 +671,11 @@ sub do_defs
|
|||||||
delete $syms{"bn_dump1"};
|
delete $syms{"bn_dump1"};
|
||||||
$platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh";
|
$platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh";
|
||||||
|
|
||||||
|
$platform{"PEM_read_NS_CERT_SEQ"} = "VMS";
|
||||||
|
$platform{"PEM_write_NS_CERT_SEQ"} = "VMS";
|
||||||
|
$platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS";
|
||||||
|
$platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS";
|
||||||
|
|
||||||
# Info we know about
|
# Info we know about
|
||||||
|
|
||||||
push @ret, map { $_."\\".&info_string($_,"EXIST",
|
push @ret, map { $_."\\".&info_string($_,"EXIST",
|
||||||
@ -884,24 +890,19 @@ EOF
|
|||||||
} else {
|
} else {
|
||||||
printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s,$n;
|
printf OUT " %s%-40s@%d\n",($W32)?"":"_",$s,$n;
|
||||||
}
|
}
|
||||||
# } else {
|
|
||||||
# print STDERR "DEBUG: \"$sym\" (@p):",
|
|
||||||
# " rsaref:", !!(!@p
|
|
||||||
# || (!$negatives
|
|
||||||
# && ($rsaref || !grep(/^RSAREF$/,@p)))
|
|
||||||
# || ($negatives
|
|
||||||
# && (!$rsaref || !grep(/^!RSAREF$/,@p))))?1:0,
|
|
||||||
# " 16:", !!($W16 && (!@p_purged
|
|
||||||
# || (!$negatives && grep(/^WIN16$/,@p))
|
|
||||||
# || ($negatives && !grep(/^!WIN16$/,@p)))),
|
|
||||||
# " 32:", !!($W32 && (!@p_purged
|
|
||||||
# || (!$negatives && grep(/^WIN32$/,@p))
|
|
||||||
# || ($negatives && !grep(/^!WIN32$/,@p)))),
|
|
||||||
# " NT:", !!($NT && (!@p_purged
|
|
||||||
# || (!$negatives && grep(/^WINNT$/,@p))
|
|
||||||
# || ($negatives && !grep(/^!WINNT$/,@p)))),
|
|
||||||
# "\n";
|
|
||||||
}
|
}
|
||||||
|
# print STDERR "DEBUG: \"$sym\" (@p):",
|
||||||
|
# " negatives:", $negatives,
|
||||||
|
# " 16:", !!($W16 && (!@p_purged
|
||||||
|
# || (!$negatives && grep(/^WIN16$/,@p))
|
||||||
|
# || ($negatives && !grep(/^!WIN16$/,@p)))),
|
||||||
|
# " 32:", !!($W32 && (!@p_purged
|
||||||
|
# || (!$negatives && grep(/^WIN32$/,@p))
|
||||||
|
# || ($negatives && !grep(/^!WIN32$/,@p)))),
|
||||||
|
# " NT:", !!($NT && (!@p_purged
|
||||||
|
# || (!$negatives && grep(/^WINNT$/,@p))
|
||||||
|
# || ($negatives && !grep(/^!WINNT$/,@p)))),
|
||||||
|
# "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf OUT "\n";
|
printf OUT "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user