#include "w32.h" /* for dostounix_filename */
#endif
-#ifdef CLASH_DETECTION
-
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
WTMP_FILE, counter);
if (! NILP (Ffile_exists_p (tempname)))
{
- Lisp_Object args[6];
-
/* The utmp functions on mescaline.gnu.org accept only
file names up to 8 characters long. Choose a 2
character long prefix, and call make_temp_file with
filename = Fexpand_file_name (build_string ("wt"),
Vtemporary_file_directory);
filename = make_temp_name (filename, 1);
- args[0] = build_string ("gzip");
- args[1] = Qnil;
- args[2] = list2 (QCfile, filename);
- args[3] = Qnil;
- args[4] = build_string ("-cd");
- args[5] = tempname;
- Fcall_process (6, args);
+ CALLN (Fcall_process, build_string ("gzip"), Qnil,
+ list2 (QCfile, filename), Qnil,
+ build_string ("-cd"), tempname);
delete_flag = 1;
}
}
return -1;
/* On current host? */
- if (STRINGP (Vsystem_name)
- && dot - (at + 1) == SBYTES (Vsystem_name)
- && memcmp (at + 1, SSDATA (Vsystem_name), SBYTES (Vsystem_name)) == 0)
+ Lisp_Object system_name = Fsystem_name ();
+ if (STRINGP (system_name)
+ && dot - (at + 1) == SBYTES (system_name)
+ && memcmp (at + 1, SSDATA (system_name), SBYTES (system_name)) == 0)
{
if (pid == getpid ())
ret = 2; /* We own it. */
0, 1, 0,
doc: /* Lock FILE, if current buffer is modified.
FILE defaults to current buffer's visited file,
-or else nothing is done if current buffer isn't visiting a file. */)
+or else nothing is done if current buffer isn't visiting a file.
+
+If the option `create-lockfiles' is nil, this does nothing. */)
(Lisp_Object file)
{
if (NILP (file))
return ret;
}
-#endif /* CLASH_DETECTION */
-
void
syms_of_filelock (void)
{
doc: /* Non-nil means use lockfiles to avoid editing collisions. */);
create_lockfiles = 1;
-#ifdef CLASH_DETECTION
defsubr (&Sunlock_buffer);
defsubr (&Slock_buffer);
defsubr (&Sfile_locked_p);
-#endif
}