]> Savannah Git Hosting - gnulib.git/commitdiff
fchmodat: Use /proc on Cygwin
authorKen Brown <kbrown@cornell.edu>
Thu, 23 Jul 2020 17:44:22 +0000 (13:44 -0400)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 23 Jul 2020 20:13:52 +0000 (13:13 -0700)
* lib/fchmodat.c (fchmodat): Use /proc on Cygwin.

ChangeLog
lib/fchmodat.c

index 8cac948ad262a8ec5e9e28a68f54440cd8e85536..9d6051f7683f1dbec32192496cdda60d6ecdc342 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-23  Ken Brown  <kbrown@cornell.edu>
+
+       * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
+
 2020-07-21  Bruno Haible  <bruno@clisp.org>
 
        aligned-malloc: Optionally use aligned_alloc.
index 8950168608f06e0ec43ec5bf5ec682f234fbe1eb..eee0a1c56e4f612522d3d87c742cff89cf565cd4 100644 (file)
@@ -98,7 +98,7 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
           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);