Port install_aux_file to OS/2

* bin/autoreconf.in (install_aux_file): Port to OS/2,
which does not allow file name operations on open files.
Problem reported by KO Myung-Hun in:
https://lists.gnu.org/r/autoconf-patches/2025-02/msg00001.html
This commit is contained in:
Paul Eggert 2025-02-09 10:00:11 -08:00
parent 220e939e5c
commit 2f64dcd048

View File

@ -400,8 +400,10 @@ sub install_aux_file
or fatal "rm -f $dest: $!";
}
my ($temp, $tempname) = tempfile (UNLINK => 0, DIR => $destdir);
copy ($src, $tempname)
copy ($src, $temp)
or fatal "copying $src to $tempname: $!";
close ($temp)
or fatal "closing $tempname: $!";
make_executable ($tempname) if -x $src;
update_file ($tempname, $dest, $force);
}