mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
autoreconf.in: improve compatibility with old perl
In very old perls (I noticed this with 5.8.4), File::Temp objects are not automatically stringified in all contexts where we expect them to be, causing autoreconf to crash. * bin/autoreconf.in (install_aux_file): Explicitly extract the temporary file’s name from $temp, and use that in all the places we were using $temp.
This commit is contained in:
parent
46f384f850
commit
73f1be5e42
@ -363,10 +363,13 @@ sub install_aux_file
|
||||
or fatal "rm -f $dest: $!\n";
|
||||
}
|
||||
my $temp = new File::Temp (UNLINK => 0, DIR => $destdir);
|
||||
copy ($src, $temp)
|
||||
or fatal "copying $src to $temp: $!\n";
|
||||
make_executable ($temp) if -x $src;
|
||||
update_file ($temp, $dest, $force);
|
||||
# Older Perls don't convert $temp to its filename
|
||||
# in all the places we need it to.
|
||||
my $tempname = $temp->filename;
|
||||
copy ($src, $tempname)
|
||||
or fatal "copying $src to $tempname: $!\n";
|
||||
make_executable ($tempname) if -x $src;
|
||||
update_file ($tempname, $dest, $force);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user