OS/2 does not allow file actions with a file name to opened files. As a result, copy(), chmod() and update_file() fail. Instead, use file handles if possible and close files before using them.
* bin/autoreconf.in (install_aux_file) [OS/2]: Pass a file handle to copy() and chmod(). And close a file before update_file(). --- bin/autoreconf.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 74c9890e..11e3c0fe 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -400,9 +400,10 @@ sub install_aux_file or fatal "rm -f $dest: $!"; } my ($temp, $tempname) = tempfile (UNLINK => 0, DIR => $destdir); - copy ($src, $tempname) + copy ($src, $^O eq 'os2' ? $temp : $tempname) or fatal "copying $src to $tempname: $!"; - make_executable ($tempname) if -x $src; + make_executable ($^O eq 'os2' ? $temp : $tempname) if -x $src; + close ($temp) if $^O eq 'os2'; update_file ($tempname, $dest, $force); } } -- 2.42.0