From: Jarkko Hietaniemi Date: Wed, 27 Feb 2002 15:08:06 +0000 (+0000) Subject: Avoid PL_OpPtr et al getting unnecessarily (when not used) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac6bedeafc71cb65cb2bb8b5b5b55f9049c21101;p=p5sagit%2Fp5-mst-13.2.git Avoid PL_OpPtr et al getting unnecessarily (when not used) into perl.exp in AIX. p4raw-id: //depot/perl@14894 --- diff --git a/makedef.pl b/makedef.pl index b75eff9..8dc1f14 100644 --- a/makedef.pl +++ b/makedef.pl @@ -116,14 +116,16 @@ close(CFG); # perl.h logic duplication begins +if ($define{PERL_IMPLICIT_SYS}) { + $define{PL_OP_SLAB_ALLOC} = 1; +} + if ($define{USE_ITHREADS}) { if (!$define{MULTIPLICITY}) { $define{MULTIPLICITY} = 1; } } -my $sym_ord = 0; - $define{PERL_IMPLICIT_CONTEXT} ||= $define{USE_ITHREADS} || $define{USE_5005THREADS} || @@ -131,6 +133,8 @@ $define{PERL_IMPLICIT_CONTEXT} ||= # perl.h logic duplication ends +my $sym_ord = 0; + if ($PLATFORM eq 'win32') { warn join(' ',keys %define)."\n"; print "LIBRARY Perl57\n"; @@ -139,7 +143,7 @@ if ($PLATFORM eq 'win32') { if ($define{PERL_IMPLICIT_SYS}) { output_symbol("perl_get_host_info"); output_symbol("perl_alloc_override"); - output_symbol("perl_clone_host"); + output_symbol("perl_clone_host"); } } elsif ($PLATFORM eq 'os2') { @@ -187,9 +191,9 @@ elsif ($PLATFORM eq 'netware') { print "EXPORTS\n"; } if ($define{PERL_IMPLICIT_SYS}) { - output_symbol("perl_get_host_info"); - output_symbol("perl_alloc_override"); - output_symbol("perl_clone_host"); + output_symbol("perl_get_host_info"); + output_symbol("perl_alloc_override"); + output_symbol("perl_clone_host"); } } @@ -613,6 +617,14 @@ unless ($define{'FAKE_THREADS'}) { skip_symbols [qw(PL_curthr)]; } +unless ($define{'PL_OP_SLAB_ALLOC'}) { + skip_symbols [qw( + PL_OpPtr + PL_OpSlab + PL_OpSpace + )]; +} + sub readvar { my $file = shift; my $proc = shift || sub { "PL_$_[2]" }; diff --git a/perl.h b/perl.h index cc451b6..2fffc93 100644 --- a/perl.h +++ b/perl.h @@ -42,6 +42,10 @@ /* See L for detailed notes on * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */ +/* Note that from here --> to <-- the same logic is + * repeated in makedef.pl, so be certain to update + * both places when editing. */ + #ifdef PERL_IMPLICIT_SYS /* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem so use slab allocator to avoid lots of MUTEX overhead @@ -69,6 +73,8 @@ # endif #endif +/* <--- here ends the logic shared by perl.h and makedef.pl */ + #ifdef PERL_IMPLICIT_CONTEXT # ifdef USE_5005THREADS struct perl_thread;