aboutsummaryrefslogtreecommitdiffstats
path: root/util/mkdef.pl
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2000-06-01 05:13:52 +0000
committerGeoff Thorpe <geoff@openssl.org>2000-06-01 05:13:52 +0000
commite41c8d6ad4d1ffab51865d8cf90baff108bbe4a1 (patch)
tree0743c50a5fb135a2731e418985504664a071bf7a /util/mkdef.pl
parentccd86b68ef7f9a5cfaaed4089bce29fdc5fe4219 (diff)
downloadopenssl-e41c8d6ad4d1ffab51865d8cf90baff108bbe4a1.tar.gz
This change will cause builds (by default) to not use different STACK
structures and functions for each stack type. The previous behaviour can be enabled by configuring with the "-DDEBUG_SAFESTACK" option. This will also cause "make update" (mkdef.pl in particular) to update the libeay.num and ssleay.num symbol tables with the number of extra functions DEBUG_SAFESTACK creates. The way this change works is to accompany each DECLARE_STACK_OF() macro with a set of "#define"d versions of the sk_##type##_*** functions that ensures all the existing "type-safe" stack calls are precompiled into the underlying stack calls. The presence or abscence of the DEBUG_SAFESTACK symbol controls whether this block of "#define"s or the DECLARE_STACK_OF() macro is taking effect. The block of "#define"s is in turn generated and maintained by a perl script (util/mkstack.pl) that encompasses the block with delimiting C comments. This works in a similar way to the auto-generated error codes and, like the other such maintenance utilities, is invoked by the "make update" target. A long (but mundane) commit will follow this with the results of "make update" - this will include all the "#define" blocks for each DECLARE_STACK_OF() statement, along with stripped down libeay.num and ssleay.num files.
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-xutil/mkdef.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 9f5fba9146..1a51f677bd 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -18,7 +18,7 @@ my $rsaref = 0;
my $W32=1;
my $NT=0;
# Set this to make typesafe STACK definitions appear in DEF
-my $safe_stack_def = 1;
+my $safe_stack_def = 0;
my $options="";
open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
@@ -49,6 +49,7 @@ foreach (@ARGV, split(/ /, $options))
$do_update=1 if $_ eq "update";
$do_ctest=1 if $_ eq "ctest";
$rsaref=1 if $_ eq "rsaref";
+ $safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK";
if (/^no-rc2$/) { $no_rc2=1; }
elsif (/^no-rc4$/) { $no_rc4=1; }
@@ -363,6 +364,7 @@ sub do_defs
foreach (split /;/, $def) {
s/^[\n\s]*//g;
s/[\n\s]*$//g;
+ next if(/#define/);
next if(/typedef\W/);
next if(/EVP_bf/ and $no_bf);
next if(/EVP_cast/ and $no_cast);