This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In makedef.pl, no need to store 'config.h' in a variable.
authorNicholas Clark <nick@ccl4.org>
Sun, 21 Aug 2011 11:40:33 +0000 (13:40 +0200)
committerNicholas Clark <nick@ccl4.org>
Thu, 25 Aug 2011 09:34:36 +0000 (11:34 +0200)
Unlike the other files opened by makedef.pl, config.h is always opened in the
current directory, so the filename doesn't modifying if $ARGS{TARG_DIR} is set.

makedef.pl

index 076b39a..1f61c47 100644 (file)
@@ -94,7 +94,6 @@ my %exportperlmalloc =
 
 my $exportperlmalloc = $ARGS{PLATFORM} eq 'os2';
 
-my $config_h    = "config.h";
 my $intrpvar_h  = "intrpvar.h";
 my $perlvars_h  = "perlvars.h";
 my $global_sym  = "global.sym";
@@ -106,7 +105,7 @@ if (exists $ARGS{TARG_DIR}) {
        foreach $intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym;
 }
 
-open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
+open(CFG, '<', 'config.h') || die "Cannot open config.h: $!\n";
 while (<CFG>) {
     $define{$1} = 1 if /^\s*\#\s*define\s+(MYMALLOC|MULTIPLICITY
                                            |SPRINTF_RETURNS_STRLEN