]> Savannah Git Hosting - gnulib.git/commitdiff
lchmod: Use /proc on Cygwin.
authorBruno Haible <bruno@clisp.org>
Thu, 23 Jul 2020 21:16:05 +0000 (23:16 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 23 Jul 2020 21:16:05 +0000 (23:16 +0200)
* lib/lchmod.c (lchmod): Use /proc on Cygwin.

ChangeLog
lib/lchmod.c

index 9d6051f7683f1dbec32192496cdda60d6ecdc342..08804223d1bf3fa60f038d853eb2243e6328debd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
+2020-07-23  Bruno Haible  <bruno@clisp.org>
+
+       lchmod: Use /proc on Cygwin.
+       * lib/lchmod.c (lchmod): Use /proc on Cygwin.
+
 2020-07-23  Ken Brown  <kbrown@cornell.edu>
 
+       fchmodat: Use /proc on Cygwin
        * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
 
 2020-07-21  Bruno Haible  <bruno@clisp.org>
index e11321162347a742ada7c281f20c7536b6484d8d..77a0060955293f8006efe8593ea108fa9fd2410d 100644 (file)
@@ -76,7 +76,7 @@ lchmod (char const *file, mode_t mode)
       return -1;
     }
 
-# if defined __linux__ || defined __ANDROID__
+# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
   static char const fmt[] = "/proc/self/fd/%d";
   char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
   sprintf (buf, fmt, fd);