1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00
emacs/nt/inc
Eli Zaretskii 343a2aefb5 Implement CLASH_DETECTION for MS-Windows.
src/filelock.c [WINDOWSNT]: Include w32.h.
 (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
 function of that name.  Up-case the macro arguments.
 (IS_LOCK_FILE): New macro.
 (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
 (create_lock_file): New function, with body extracted from
 lock_file_1.
 [WINDOWSNT]: Implement lock files by writing a regular file with
 the lock information as its contents.
 (read_lock_data): New function, on Posix platforms just calls
 emacs_readlinkat.
 [WINDOWSNT]: Read the lock info from the file.
 (current_lock_owner): Call read_lock_data instead of calling
 emacs_readlinkat directly.
 (lock_file) [WINDOWSNT]: Run the file name through
 dostounix_filename.
 src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case
 just check if the process by that PID exists.
 src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
 also present, as doing so will fail to error out if the file
 already exists.
 src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.

 nt/inc/ms-w32.h (BOOT_TIME_FILE): Define.
 nt/config.nt (CLASH_DETECTION): Define to 1.

 lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files
 that match "\`\.#", to avoid compiling lock files, even if they
 are readable (as they are on MS-Windows).

 doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the
 exclusive means of locking files.

 etc/NEWS: Mention support for lock files on MS-Windows.
2013-02-25 19:36:03 +02:00
..
arpa Nuke arch-tags. 2011-01-15 15:16:57 -08:00
netinet Nuke arch-tags. 2011-01-15 15:16:57 -08:00
sys Use fdopendir, fstatat and readlinkat, for efficiency. 2013-01-31 22:30:51 -08:00
dirent.h Make opendir on MS-Windows accept a 'const char *'. 2013-01-28 16:41:08 +02:00
grp.h Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
inttypes.h Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
langinfo.h Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
ms-w32.h Implement CLASH_DETECTION for MS-Windows. 2013-02-25 19:36:03 +02:00
netdb.h Nuke arch-tags. 2011-01-15 15:16:57 -08:00
nl_types.h Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
pwd.h Fix warnings when compiling on MS-Windows with -std=gnu99. 2012-10-17 21:02:44 +02:00
stdalign.h MS-Windows followup for 2012-07-28T23:05:32Z!eggert@cs.ucla.edu. 2012-07-29 18:43:09 +03:00
stdbool.h Fix the MS-Windows build broken by 2011-01-30T23:34:18Z!eggert@cs.ucla.edu and 2011-01-31T08:15:13Z!eggert@cs.ucla.edu. 2011-01-31 21:36:08 +02:00
stdint.h Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
unistd.h Use fdopendir, fstatat and readlinkat, for efficiency. 2013-01-31 22:30:51 -08:00