Commit 2ae87d46 authored by Richard Levitte's avatar Richard Levitte
Browse files

When inside a #if 0..#endif, do not define anything.

parent e3ef8d2e
Loading
Loading
Loading
Loading
+108 −107
Original line number Diff line number Diff line
@@ -452,7 +452,7 @@ sub do_defs
				$tag{"TRUE"}=-1;
				print STDERR "DEBUG: $file: found 0\n" if $debug;
			} elsif (/^\#\s*define\s+(\w+)\s+(\w+)/
				 && $symhacking) {
				 && $symhacking && $tag{'TRUE'} != -1) {
				my $s = $1;
				my $a = $2;
				my $a1 = join(",",
@@ -491,6 +491,7 @@ sub do_defs
					    .join(',',@current_algorithms).";";
				next;
			}
			if ($tag{'TRUE'} != -1) {
				if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
					next;
				} elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) {
@@ -547,6 +548,7 @@ sub do_defs
					# Things that are everywhere
					$def .= "int PEM_read_bio_$1(void);";
					$def .= "int PEM_write_bio_$1(void);";
					next;
				} elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ ||
					 /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) {
					# Things not in Win16
@@ -561,6 +563,7 @@ sub do_defs
						    .join(',',@current_algorithms).";";
					# Things that are everywhere
					$def .= "int PEM_write_bio_$1(void);";
					next;
				} elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ ||
					 /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) {
					# Things not in Win16
@@ -575,11 +578,8 @@ sub do_defs
						    .join(',',@current_algorithms).";";
					# Things that are everywhere
					$def .= "int PEM_read_bio_$1(void);";
			} elsif (
				($tag{'TRUE'} != -1)
				&& ($tag{'CONST_STRICT'} != 1)
				 )
				{
					next;
				} elsif ($tag{'CONST_STRICT'} != 1) {
					if (/\{|\/\*|\([^\)]*$/) {
						$line = $_;
					} else {
@@ -587,6 +587,7 @@ sub do_defs
					}
				}
			}
		}
		close(IN);

		my $algs;
@@ -670,6 +671,11 @@ sub do_defs
        delete $syms{"bn_dump1"};
	$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

	push @ret, map { $_."\\".&info_string($_,"EXIST",
@@ -884,13 +890,9 @@ EOF
				} else {
					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,
#			" negatives:", $negatives,
#			" 16:", !!($W16 && (!@p_purged
#					    || (!$negatives && grep(/^WIN16$/,@p))
#					    || ($negatives && !grep(/^!WIN16$/,@p)))),
@@ -903,7 +905,6 @@ EOF
#			"\n";
		}
	}
	}
	printf OUT "\n";
}