]> git.eshelyaron.com Git - emacs.git/commitdiff
(Ffile_writable_p): Don't use ro_fsys.
authorRichard M. Stallman <rms@gnu.org>
Sun, 18 Sep 1994 20:01:47 +0000 (20:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 18 Sep 1994 20:01:47 +0000 (20:01 +0000)
(ro_fsys): Deleted.

src/fileio.c

index 299eb2d2609fd0920807b4a0ae7eebae930c7346..b0b01cef50eb541262f881aecae684121c47d449 100644 (file)
@@ -2292,30 +2292,6 @@ Otherwise returns nil.")
 #endif /* not S_IFLNK */
 }
 
-#ifdef SOLARIS_BROKEN_ACCESS
-/* In Solaris 2.1, the readonly-ness of the filesystem is not
-   considered by the access system call.  This is Sun's bug, but we
-   still have to make Emacs work.  */
-
-#include <sys/statvfs.h>
-
-static int
-ro_fsys (path)
-    char *path;
-{
-    struct statvfs statvfsb;
-
-    if (statvfs(path, &statvfsb))
-      return 1;  /* error from statvfs, be conservative and say not wrtable */
-    else
-      /* Otherwise, fsys is ro if bit is set.  */
-      return statvfsb.f_flag & ST_RDONLY;
-}
-#else
-/* But on every other os, access has already done the right thing.  */
-#define ro_fsys(path) 0
-#endif
-
 /* Having this before file-symlink-p mysteriously caused it to be forgotten
    on the RT/PC.  */
 DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
@@ -2336,8 +2312,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
     return call2 (handler, Qfile_writable_p, abspath);
 
   if (access (XSTRING (abspath)->data, 0) >= 0)
-    return ((access (XSTRING (abspath)->data, 2) >= 0
-            && ! ro_fsys ((char *) XSTRING (abspath)->data))
+    return (access (XSTRING (abspath)->data, 2) >= 0
            ? Qt : Qnil);
   dir = Ffile_name_directory (abspath);
 #ifdef VMS
@@ -2348,8 +2323,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
   if (!NILP (dir))
     dir = Fdirectory_file_name (dir);
 #endif /* MSDOS */
-  return ((access (!NILP (dir) ? (char *) XSTRING (dir)->data : "", 2) >= 0
-          && ! ro_fsys ((char *) XSTRING (dir)->data))
+  return (access (!NILP (dir) ? (char *) XSTRING (dir)->data : "", 2) >= 0
          ? Qt : Qnil);
 }