comparison src/filelock.c @ 21902:e40329fcfc5e

Include coding.h. (lock_file): Encode the file name, to make lock file name.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 May 1998 06:38:41 +0000
parents 75f04f235df1
children 7620443f1878
comparison
equal deleted inserted replaced
21901:1b46a79d86e3 21902:e40329fcfc5e
39 #include <unistd.h> 39 #include <unistd.h>
40 #endif 40 #endif
41 41
42 #include "lisp.h" 42 #include "lisp.h"
43 #include "buffer.h" 43 #include "buffer.h"
44 #include "charset.h"
45 #include "coding.h"
44 46
45 #include <time.h> 47 #include <time.h>
46 #include <errno.h> 48 #include <errno.h>
47 #ifndef errno 49 #ifndef errno
48 extern int errno; 50 extern int errno;
368 370
369 void 371 void
370 lock_file (fn) 372 lock_file (fn)
371 Lisp_Object fn; 373 Lisp_Object fn;
372 { 374 {
373 register Lisp_Object attack, orig_fn; 375 register Lisp_Object attack, orig_fn, encoded_fn;
374 register char *lfname, *locker; 376 register char *lfname, *locker;
375 lock_info_type lock_info; 377 lock_info_type lock_info;
376 378
377 orig_fn = fn; 379 orig_fn = fn;
378 fn = Fexpand_file_name (fn, Qnil); 380 fn = Fexpand_file_name (fn, Qnil);
381 encoded_fn = ENCODE_FILE (fn);
379 382
380 /* Create the name of the lock-file for file fn */ 383 /* Create the name of the lock-file for file fn */
381 MAKE_LOCK_NAME (lfname, fn); 384 MAKE_LOCK_NAME (lfname, encoded_fn);
382 385
383 /* See if this file is visited and has changed on disk since it was 386 /* See if this file is visited and has changed on disk since it was
384 visited. */ 387 visited. */
385 { 388 {
386 register Lisp_Object subject_buf; 389 register Lisp_Object subject_buf;