Index: lib/mkdir-p.c =================================================================== RCS file: /cvsroot/coreutils/coreutils/lib/mkdir-p.c,v retrieving revision 1.11 diff -u -r1.11 mkdir-p.c --- lib/mkdir-p.c 22 Sep 2005 05:42:26 -0000 1.11 +++ lib/mkdir-p.c 12 Oct 2005 19:52:28 -0000 @@ -49,6 +49,10 @@ # define ENOSYS EEXIST #endif +#ifndef EROFS +# define EROFS EEXIST +#endif + #define WX_USR (S_IWUSR | S_IXUSR) /* Ensure that the directory ARG exists. @@ -215,14 +219,18 @@ leading_dirs = new; } } - else if (errno == EEXIST || errno == ENOSYS) + else if (errno == EEXIST || errno == ENOSYS || errno == EROFS) { /* A file is already there. Perhaps it is a directory. If not, it will be diagnosed later. The ENOSYS is for Solaris 8 NFS clients, which can fail with errno == ENOSYS if mkdir is invoked on an - NFS mount point. */ + NFS mount point. + + The EROFS is for cygwin, which can fail with + errno == EROFS if the file exists but is part of a + read only file system. */ } else {