autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2


From: KO Myung-Hun
Subject: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2
Date: Sat, 14 Oct 2023 22:19:57 +0900

OS/2 does not allow chmod() on an opened file.

* bin/autom4te.in (handle_output): Ignore setting mode failure on OS/2.
---
 bin/autom4te.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/autom4te.in b/bin/autom4te.in
index 71d7e6a6..ac5fe18b 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -571,7 +571,8 @@ sub handle_output ($$)
 
       # File::Temp doesn't give us access to 3-arg open(2), unfortunately.
       chmod (oct ($mode) & ~(umask), $scratchfile)
-        or fatal "setting mode of " . $scratchfile . ": $!";
+        or fatal "setting mode of " . $scratchfile . ": $!"
+             unless $^O eq 'os2';
     }
 
   my $in = new Autom4te::XFile ($ocache . $req->id, "<");
-- 
2.42.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]