bug-coreutils
[Top][All Lists]
Advanced

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

mkdir-p.c port to Solaris 8 NFS client


From: Paul Eggert
Subject: mkdir-p.c port to Solaris 8 NFS client
Date: Wed, 21 Sep 2005 22:45:20 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed the following to handle a porting problem on Solaris 8.

2005-09-21  Paul Eggert  <address@hidden>

        * mkdir-p.c: Change "#if HAVECONFIG_H" to "#ifdef", for
        compatibility with latest gnulib.
        (ENOSYS): Define to EEXIST if not defined.
        (make_dir_parents): Treat ENOSYS like EEXIST.

Index: mkdir-p.c
===================================================================
RCS file: /fetish/cu/lib/mkdir-p.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -p -u -r1.10 -r1.11
--- mkdir-p.c   2 Jul 2005 08:41:46 -0000       1.10
+++ mkdir-p.c   22 Sep 2005 05:42:26 -0000      1.11
@@ -19,7 +19,7 @@
 
 /* Written by David MacKenzie <address@hidden> and Jim Meyering.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -45,6 +45,10 @@
 #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
            {




reply via email to

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