From: Steve Peters Date: Wed, 15 Jun 2005 11:30:41 +0000 (-0500) Subject: Re: [PATCH] make -f invalid when USE_SITECUSTOMIZE isn't set X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ab019eaa775fdcae8aaf709315c7ba85a788ee6c;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] make -f invalid when USE_SITECUSTOMIZE isn't set Message-ID: <20050615163040.GA14745@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@24854 --- diff --git a/ext/Devel/DProf/t/DProf.t b/ext/Devel/DProf/t/DProf.t index bdd70b0..84bc927 100644 --- a/ext/Devel/DProf/t/DProf.t +++ b/ext/Devel/DProf/t/DProf.t @@ -17,6 +17,7 @@ END { } use Benchmark qw( timediff timestr ); +use Config; use Getopt::Std 'getopts'; getopts('vI:p:'); @@ -45,10 +46,11 @@ sub profile { my $test = shift; my @results; local $ENV{PERL5LIB} = $perl5lib; + my $opt_f = $Config{ccflags} =~ /USE_SITECUSTOMIZE/ ? '-f' : ''; my $opt_d = '-d:DProf'; my $t_start = new Benchmark; - open( R, "$perl -f \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n"; + open( R, "$perl $opt_f \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n"; @results = ; close R or warn "Could not close: $!"; my $t_total = timediff( new Benchmark, $t_start ); @@ -76,7 +78,7 @@ $| = 1; print "1..20\n"; while( @tests ){ $test = shift @tests; - $test =~ s/\.$// if $^O eq 'VMS'; + $test =~ s/\.$// if $^O eq 'VMS'; if( $test =~ /_t$/i ){ print "# $test" . '.' x (20 - length $test); profile $test; diff --git a/perl.c b/perl.c index ba25c33..3df8519 100644 --- a/perl.c +++ b/perl.c @@ -1282,7 +1282,9 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) register SV *sv; register char *s; const char *cddir = Nullch; +#ifdef USE_SITECUSTOMIZE bool minus_f = FALSE; +#endif PL_fdscript = -1; PL_suidscript = -1; @@ -1376,11 +1378,13 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) sv_catpv(PL_e_script, "\n"); break; +#ifdef USE_SITECUSTOMIZE case 'f': minus_f = TRUE; s++; goto reswitch; +#endif case 'I': /* -I handled both here and in moreswitches() */ forbid_setid("-I"); if (!*++s && (s=argv[1]) != Nullch) {