]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(ENOSYS): Define to EEXIST if not defined.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Sep 2005 05:42:26 +0000 (05:42 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Sep 2005 05:42:26 +0000 (05:42 +0000)
(make_dir_parents): Treat ENOSYS like EEXIST.

lib/mkdir-p.c

index 315a3a06a97748cba8baf4a8931a3c2467eb0ed6..b074c0aa784169bb0428733b448d13745b9baa42 100644 (file)
@@ -19,7 +19,7 @@
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu> and Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
 #include "quote.h"
 #include "stat-macros.h"
 
+#ifndef ENOSYS
+# define ENOSYS EEXIST
+#endif
+
 #define WX_USR (S_IWUSR | S_IXUSR)
 
 /* Ensure that the directory ARG exists.
@@ -211,10 +215,14 @@ make_dir_parents (char const *arg,
                  leading_dirs = new;
                }
            }
-         else if (errno == EEXIST)
+         else if (errno == EEXIST || errno == ENOSYS)
            {
              /* A file is already there.  Perhaps it is a directory.
-                If not, it will be diagnosed later.  */
+                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.  */
            }
          else
            {