]> code.delx.au - gnu-emacs/blobdiff - src/filelock.c
Add a note how to use `tramp-own-remote-path'
[gnu-emacs] / src / filelock.c
index c58484a639b2cd613524bb28d6b3e32a797c51c4..2f92e0fdc83f5b868442a91abd393ed9b7decef1 100644 (file)
@@ -53,6 +53,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "w32.h"       /* for dostounix_filename */
 #endif
 
+#ifndef MSDOS
+
 #ifdef HAVE_UTMP_H
 #include <utmp.h>
 #endif
@@ -63,7 +65,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define BOOT_TIME_FILE "/var/run/random-seed"
 #endif
 
-#ifndef WTMP_FILE
+#if !defined WTMP_FILE && !defined WINDOWSNT
 #define WTMP_FILE "/var/log/wtmp"
 #endif
 
@@ -485,7 +487,7 @@ read_lock_data (char *lfname, char lfinfo[MAX_LFINFO + 1])
   while ((nbytes = readlinkat (AT_FDCWD, lfname, lfinfo, MAX_LFINFO + 1)) < 0
         && errno == EINVAL)
     {
-      int fd = emacs_open (lfname, O_RDONLY | O_BINARY | O_NOFOLLOW, 0);
+      int fd = emacs_open (lfname, O_RDONLY | O_NOFOLLOW, 0);
       if (0 <= fd)
        {
          /* Use read, not emacs_read, since FD isn't unwind-protected.  */
@@ -732,6 +734,19 @@ unlock_file (Lisp_Object fn)
   SAFE_FREE ();
 }
 
+#else  /* MSDOS */
+void
+lock_file (Lisp_Object fn)
+{
+}
+
+void
+unlock_file (Lisp_Object fn)
+{
+}
+
+#endif /* MSDOS */
+
 void
 unlock_all_files (void)
 {
@@ -795,6 +810,9 @@ The value is nil if the FILENAME is not locked,
 t if it is locked by you, else a string saying which user has locked it.  */)
   (Lisp_Object filename)
 {
+#ifdef MSDOS
+  return Qnil;
+#else
   Lisp_Object ret;
   char *lfname;
   int owner;
@@ -815,6 +833,7 @@ t if it is locked by you, else a string saying which user has locked it.  */)
 
   SAFE_FREE ();
   return ret;
+#endif
 }
 
 void