]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Port install_aux_file to OS/2
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Feb 2025 18:00:11 +0000 (10:00 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Feb 2025 18:18:35 +0000 (10:18 -0800)
* 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

bin/autoreconf.in

index 74c9890e3ab8d555bd0de127904d970899e8092f..a5ffc6fa76a65972227c42fa5ac3c1ed5800e2fc 100644 (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);
     }