aboutsummaryrefslogtreecommitdiffstats
path: root/nt/inc
Commit message (Collapse)AuthorAgeFilesLines
* * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.Dmitry Antipov2014-06-051-0/+1
| | | | | | * nt/inc/ms-w32.h (POLL_FOR_INPUT): Likewise. * src/keyboard.c, src/process.c: Do not define POLL_FOR_INPUT here because it will be defined in generated config.h if needed.
* Use mmap(2) emulation for buffer text on MS-Windows.Fabrice Popineau2014-05-272-8/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from configure. (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used. src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero for MinGW, since it no longer uses gmalloc. src/buffer.c: Do not define mmap allocations functions for Windows. Remove mmap_find which is unused. Remove mmap_set_vars which does nothing useful. [WINDOWSNT]: Include w32heap.h. (init_buffer): Always allocate new memory for buffers. src/emacs.c: Remove mmap_set_vars calls. src/image.c (free_image): Undef free for Windows because it is redirected to our private version. src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility. (copy_executable_and_dump_data): Remove dumping the heap section. (unexec): Restore using_dynamic_heap after dumping. src/w32heap.c (dumped_data_commit, malloc_after_dump) (malloc_before_dump, realloc_after_dump, realloc_before_dump) (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc) (mmap_free): New functions. src/w32heap.h: Declare dumped_data and mmap_* function prototypes. nt/inc/ms-w32.h: Switch to the system heap allocation scheme instead of GNU malloc and ralloc. nt/inc/sys/mman.h: New file. nt/INSTALL: Update for the new build requirements. etc/NEWS: Mention build changes on MS-Windows. configure.ac (C_HEAP_SWITCH) define for different values of dumped heap size depending on 32/64bits arch on Windows. Don't check for pthreads.h on MinGW32/64, it gets in the way. Use mmap(2) for buffers and system malloc for MinGW32/64.
* Fix redefinition warning in MinGW64 build.Eli Zaretskii2014-04-211-0/+3
| | | | | nt/inc/ms-w32.h (lseek): Define only if not already a macro. Suggested by Fabrice Popineau <[email protected]>.
* Fix MS-Windows build with MinGW runtime 4.x.Claudio Bley2014-01-111-0/+7
| | | | | nt/inc/sys/stat.h (_WSTAT_DEFINED): Define, to avoid compilation failures when wchar.h is included.
* Fix minor build problems related to MinGW64.Fabrice Popineau2014-01-111-0/+5
| | | | | | | | | configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is "MINGW64" as well. nt/inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64. src/unexw32.c (_start) [__MINGW64__]: Define to __start.
* Spelling fixes.Paul Eggert2014-01-091-1/+1
| | | | | | * mail/unrmail.el (unrmail-mbox-format): Choice is mboxo, not mboxro. * woman.el (woman-mark-horizontal-position): Rename from woman-mark-horizonal-position. Use changed.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-019-9/+9
|
* Minor fixes for MinGW64 build.Fabrice Popineau2013-12-311-1/+1
| | | | | | | | | | | | | | | | configure.ac (canonical, C_SWITCH_SYSTEM): Support a 64-bit MinGW64 build on MS-Windows. nt/inc/ms-w32.h (sys_kill): Fix prototype. src/w32term.c (w32_initialize): Use LCID and LOWORD. src/w32proc.c (create_child): Use pid_t for 5th argument. (IsValidLocale): Don't provide prototype for MinGW64. (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout) (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD. src/w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which MinGW64 doesn't support. src/lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
* Fix bug #16299 with assertion violation in set-default-file-modes on Windows.Eli Zaretskii2013-12-301-1/+3
| | | | | | src/w32.c (sys_umask): New function. nt/inc/ms-w32.h (umask) [emacs]: Redirect to sys_umask.
* Merge from trunk.Eli Zaretskii2013-12-071-4/+1
|\
| * * configure.ac (HAVE_MENUS): Remove.Stefan Monnier2013-11-281-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | * src/xmenu.c (Fmenu_or_popup_active_p): * src/window.c (Fset_window_configuration): * src/menu.c (Fx_popup_menu, Fx_popup_dialog): * src/keyboard.c (record_menu_key, read_char_x_menu_prompt): * src/fns.c (Fyes_or_no_p): * src/editfns.c (Fmessage_box, Fmessage_or_box): * src/alloc.c (make_save_ptr_ptr): * src/xdisp.c, src/w32menu.c, src/term.c, src/xterm.h, src/xterm.c: Remove HAVE_MENUS.
* | Dirent functions and directory-files are converted and work.Eli Zaretskii2013-11-092-1/+9
| |
* | Start; wrote conversion from UTF-8 to UTF-16 and ANSI.Eli Zaretskii2013-10-191-0/+3
|/
* Attempt to fix time_t related problems with MinGW 4.0 runtime.Eli Zaretskii2013-10-142-25/+33
| | | | | | | | nt/inc/mingw_time.h: New file. nt/inc/ms-w32.h: Include mingw_time.h instead of doing its job. src/w32proc.c: Include mingw_time.h. src/w32.c: Include mingw_time.h.
* Make the MinGW32 build compatible with MinGW runtime 4.x.Eli Zaretskii2013-10-122-0/+47
| | | | | | | | | | | nt/inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make the layout of 'struct dirent' be compatible with MinGW32 runtime versions 4.0 and later. nt/inc/ms-w32.h (__MINGW_MAJOR_VERSION, __MINGW_MINOR_VERSION) (__MINGW_PATCHLEVEL) [!__MINGW64_VERSION_MAJOR]: Define, if not defined, but not for MinGW64. (_USE_32BIT_TIME_T) [__MINGW64_VERSION_MAJOR]: Define, to force use of 32-bit time_t type.
* Minor fix of the last commit.Eli Zaretskii2013-08-041-2/+0
|
* Implement mkostemp for MS-Windows.Eli Zaretskii2013-08-041-0/+2
| | | | | | | | | | | nt/mingw-cfg.site (ac_cv_func_mkostemp): New var with value of "yes". nt/inc/ms-w32.h (mkostemp): Declare prototype. nt/config.nt (HAVE_MKOSTEMP): Define to 1. src/w32.c (mkostemp): New function. (mktemp): Remove, no longer used. Most of the code reused in mkostemp. Fixes: debbugs:15015
* MS-Windows followup for 2013-07-07T18:00:[email protected].Eli Zaretskii2013-07-071-0/+4
| | | | | | | | | | | nt/inc/sys/socket.h (F_SETFD, O_CLOEXEC, F_DUPFD_CLOEXEC) (FD_CLOEXEC): New macros. src/w32.c (sys_dup): Declare prototype. src/filelock.c: src/emacs.c: src/callproc.c [WINDOWSNT]: Include sys/socket.h.
* Make file descriptors close-on-exec when possible.Paul Eggert2013-07-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies Emacs a bit, since it no longer needs to worry about closing file descriptors by hand in some cases. It also fixes some unlikely races. Not all such races, as libraries often open files internally without setting close-on-exec, but it's an improvement. * admin/merge-gnulib (GNULIB_MODULES): Add fcntl, pipe2. (GNULIB_TOOL_FLAGS): Avoid binary-io, close. Do not avoid fcntl. * configure.ac (mkostemp): New function to check for. (PTY_OPEN): Pass O_CLOEXEC to posix_openpt. * lib/fcntl.c, lib/getdtablesize.c, lib/pipe2.c, m4/fcntl.m4: * m4/getdtablesize.m4, m4/pipe2.m4: New files, taken from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * nt/gnulib.mk: Remove empty gl_GNULIB_ENABLED_verify section; otherwise, gnulib-tool complains given close-on-exec changes. * nt/inc/ms-w32.h (pipe): Remove. * nt/mingw-cfg.site (ac_cv_func_fcntl, gl_cv_func_fcntl_f_dupfd_cloexec) (gl_cv_func_fcntl_f_dupfd_works, ac_cv_func_pipe2): New vars. * src/alloc.c (valid_pointer_p) [!WINDOWSNT]: * src/callproc.c (Fcall_process) [!MSDOS]: * src/emacs.c (main) [!DOS_NT]: * src/nsterm.m (ns_term_init): * src/process.c (create_process): Use 'pipe2' with O_CLOEXEC instead of 'pipe'. * src/emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]: * src/filelock.c (create_lock_file) [HAVE_MKOSTEMP]: Prefer mkostemp with O_CLOEXEC to mkstemp. * src/callproc.c (relocate_fd) [!WINDOWSNT]: * src/emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD. No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're now using pipe2. * src/filelock.c (create_lock_file) [! HAVE_MKOSTEMP]: Make the resulting file descriptor close-on-exec. * src/lisp.h, src/lread.c, src/process.c (close_load_descs, close_process_descs): * src/lread.c (load_descriptor_list, load_descriptor_unwind): Remove; no longer needed. All uses removed. * src/process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system. (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]: New functions. (socket) [!SOCK_CLOEXEC]: Supply a substitute. (Fmake_network_process, Fnetwork_interface_list): (Fnetwork_interface_info, server_accept_connection): Make newly-created socket close-on-exec. * src/sysdep.c (emacs_open, emacs_fopen): Make new-created descriptor close-on-exec. * src/w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs. * src/w32.c, src/w32.h (pipe2): Rename from 'pipe', with new flags arg. Fixes: debbugs:14803
* Attempt to resolve gettimeofday compilation errors with MinGW64.Eli Zaretskii2013-06-031-2/+0
| | | | | | | src/w32.c (gettimeofday): Make the signature identical to prototype in nt/inc/sys/time.h. nt/inc/sys/time.h (struct timeval): Remove the _W64 guards.
* Fix compilation error on MinGW64 due to nt/inc/sys/time.h.Eli Zaretskii2013-06-011-0/+1
| | | | | nt/inc/sys/time.h [!_TIMEZONE_DEFINED]: Define _TIMEZONE_DEFINED to avoid multiple definition errors on MinGW64.
* Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat.Eli Zaretskii2013-05-311-3/+8
| | | | | | | | nt/inc/sys/time.h (gettimeofday): Use '__restrict' instead of 'restrict', which is a C99 extension. See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html and the following discussion for the problem this caused in the old nt/configure.bat build.
* Define SIZE_MAX for MSVC, part of bug #14409.Eli Zaretskii2013-05-161-0/+1
| | | | nt/inc/stdint.h (SIZE_MAX) [!__GNUC__]: Define.
* Fixed nt/mingw-cfg.site to pass the configure step.Eli Zaretskii2013-05-151-4/+3
|
* Merge from trunk, configury not fixed yet.Eli Zaretskii2013-05-151-0/+6
|\
| * Use Gnulib ACL implementation, for benefit of Solaris etc.Paul Eggert2013-05-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove -with-acl option, since Gnulib does that for us now. (LIBACL_LIBS): Remove; no longer needed. * lib/Makefile.am (CLEANFILES, SUFFIXES): New (empty) macros, for the benefit of the new ACL implementation. * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/acl-errno-valid.$(O). ($(BLD)/acl-errno-valid.$(O)): New rule. * lib/acl-errno-valid.c, lib/acl-internal.h, lib/acl.h: * lib/acl_entries.c, lib/errno.in.h, lib/file-has-acl.c: * lib/qcopy-acl.c, lib/qset-acl.c, m4/acl.m4, m4/errno_h.m4: New files, taken from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * admin/merge-gnulib (GNULIB_MODULES): Add qacl. (GNULIB_TOOL_FLAGS): Do not avoid errno. * etc/NEWS: Emacs is no longer limited to POSIX ACLs. --disable-acl, not --without-acl, since we're now using Gnulib's implementation. * nt/config.nt (HAVE_ACL_SET_FILE): Rename from HAVE_POSIX_ACL. * nt/inc/ms-w32.h (EOPNOTSUPP): New macro. * src/Makefile.in (LIB_ACL): New macro. (LIBACL_LIBS): Remove. (LIBES): Use LIB_ACL, not LIBACL_LIBS. * src/fileio.c: Include <acl.h>. Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL. (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by !acl_errno_valid. (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling it ourselves. Fixes: debbugs:14295
* | Fixed misc compilation warnings and errors. Dumping errors out.Eli Zaretskii2013-04-012-6/+36
| |
* | Added nt/gnulib.mk and removed kludges from ms-w32.h and ntlib.h.Eli Zaretskii2013-03-311-14/+0
| |
* | Finished with lib-src compilation, except emacsclientw and emacsclient.res.Eli Zaretskii2013-03-301-1/+3
| | | | | | | | Next -- compilation in nt/, and then problems in src/.
* | Fixed compilation problems in lib/.Eli Zaretskii2013-03-302-7/+17
| |
* | Fixed redefinition of EMACS_CONFIGURATION.Eli Zaretskii2013-03-301-0/+2
| |
* | Merge from trunk.Eli Zaretskii2013-03-301-1/+0
|\|
| * Move MS-Windows definition of TERM_HEADER from ms-w32.h to config.nt.Eli Zaretskii2013-03-301-1/+0
| | | | | | | | | | | | nt/inc/ms-w32.h (TERM_HEADER): Remove definition. nt/config.nt (TERM_HEADER): Move the definition to "w32term.h" from ms-w32.h.
* | Merge from trunk.Eli Zaretskii2013-03-301-0/+1
|\|
| * Enable the 'copysign' primitive on MS-Windows.Eli Zaretskii2013-03-301-0/+1
| | | | | | | | | | nt/inc/ms-w32.h (copysign) [_MSC_VER]: Redirect to _copysign. nt/config.nt (HAVE_COPYSIGN): Define.
* | Finished with config.nt diffs. Problem with mmsystem.h remains.Eli Zaretskii2013-03-291-5/+15
| |
* | Use 'restrict' in gettimeofday arguments, and make ms-w32.h compatible.Eli Zaretskii2013-03-282-3/+8
| |
* | Fix the gettimeofday_timezone test.Eli Zaretskii2013-03-281-1/+3
| |
* | Merge from trunk and resolve conflicts.Eli Zaretskii2013-03-2813-25/+133
|\|
| * Avoid MinGW64 compiler warnings.Eli Zaretskii2013-03-271-0/+4
| | | | | | | | | | nt/inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to avoid MinGW64 compiler warnings in editfns.c.
| * Fix _setjmp calls for MinGW64.Eli Zaretskii2013-03-261-0/+4
| | | | | | | | | | nt/config.nt: Don't undefine HAVE__SETJMP here. nt/inc/ms-w32.h (HAVE__SETJMP) [_W64]: Undefine for MinGW64 here..
| * Fix problem with _setjmp in MinGW64-compiled Emacs.Eli Zaretskii2013-03-261-1/+0
| | | | | | | | | | | | nt/inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS): Don't define. nt/config.nt (HAVE__SETJMP) [!_W64]: Don't define for MinGW64, as its _setjmp accepts 2 arguments.
| * Fix more MinGW64 incompatibilities.Eli Zaretskii2013-03-262-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Reported by ׃scar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html nt/inc/ms-w32.h (_WIN32_WINNT) [!_W64]: Don't define for MinGW64. nt/inc/sys/stat.h (chmod): Remove _CRTIMP from prototype. src/w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]: Define only for _WIN32_WINNT less than 0x0500.
| * Fix more incompatibilities between MinGW.org and MinGW64 headersEli Zaretskii2013-03-263-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by ׃scar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00699.html and in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00707.html. nt/inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS) [_W64]: Define to 1. For MinGW64, include sys/types.h and time.h. nt/inc/sys/time.h (struct timeval) [!_W64]: Guard definition with _W64. (struct timezone) [!_TIMEZONE_DEFINED]: Guard definition with _TIMEZONE_DEFINED. nt/addpm.c (_WIN32_IE) [_W64]: For MinGW64, don't define to 0x400. nt/inc/sys/stat.h: Remove _CRTIMP from prototypes of fstat, stat, lstat, and fstatat. lib-src/ntlib.c (struct timespec) [!_TIMEZONE_DEFINED]: Define the struct only if _TIMEZONE_DEFINED is not defined. src/w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. src/w32.c (REPARSE_DATA_BUFFER): Guard with MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
| * Fix incompatibilities between MinGW.org and MinGW64 headersEli Zaretskii2013-03-252-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems were reported by ׃scar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00611.html. nt/inc/ms-w32.h (struct timespec): Don't define if _TIMESPEC_DEFINED is already defined. (sigset_t) [!_POSIX]: Typedef for MinGW64. (_WIN32_WINNT, WIN32_LEAN_AND_MEAN): Move definitions before including the first system header, to avoid redefinition if some system header defines a default value. nt/inc/sys/time.h (struct itimerval): Don't define if _TIMESPEC_DEFINED is already defined.
| * Fix problems with MSVC build reported in bug #13939.Eli Zaretskii2013-03-161-0/+2
| | | | | | | | | | nt/inc/stdint.h (UINTPTR_MAX): Define. nt/nmake.defs (libc): Fix syntax of !if conditional.
| * File synchronization fixes.Paul Eggert2013-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/CPP-DEFINES (BSD_SYSTEM, HAVE_FSYNC): Remove. * admin/merge-gnulib (GNULIB_MODULES): Add fsync, fdatasync. * configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed. (fsync): Remove check; now done by gnulib. * lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4: New files, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib-src/Makefile.in (LIB_FDATASYNC): New macro. (emacsclient${EXEEXT}): Use it. * lib-src/emacsclient.c (main): Use fdatasync, not fsync, since we don't care about metadata. Keep trying if interrupted. * lib-src/movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since fsync is available everywhere (or there is a substitute). Don't report an error if fsync returns EINVAL. * nt/inc/ms-w32.h (fdatasync): New macro, suggested by Eli Zaretskii. * src/Makefile.in (LIB_FDATASYNC): New macro. (LIBES): Use it. * src/conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed. * src/fileio.c (Fwrite_region, write_region_inhibit_fsync): Don't worry about HAVE_FSYNC, since a substitute fsync is available if the system lacks one. (Fwrite_regin): Retry fsync if interrupted. Fixes: debbugs:13944
| * FILE's lock is now always .#FILE and may be a regular file.Paul Eggert2013-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Document this. * nt/inc/unistd.h (O_NOFOLLOW): New macro. * src/filelock.c: Include <c-ctype.h>. (MAX_LFINFO): New top-level constant. (lock_info_type): Remove members pid, boot_time. Add members at, dot, colon. Change user member to be the entire buffer, not a pointer. This allows us to handle the case where a foreign pid or boot time exceeds the local range. All uses changed. (LINKS_MIGHT_NOT_WORK): New constant. (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing. (defined_WINDOWSNT): Remove. (MAKE_LOCK_NAME, file_in_lock_file_name): Always use .#FILE (not .#-FILE) for the file lock, even if it is a regular file. (rename_lock_file): New function. (create_lock_file): Use it. (create_lock_file, read_lock_data): Prefer a symbolic link for the lock file, falling back on a regular file if symlinks don't work. Do not try to create symlinks on MS-Windows, due to security hassles. Stick with POSIXish functions (open, read, write, close, fchmod, readlink, symlink, link, rename, unlink, mkstemp) when creating locks, as a GNUish host may be using a Windowsish file system, and cannot use MS-Windows-only system calls. Fall back on mktemp if mkstemp doesn't work. Don't fail merely because of a symlink-contents length limit in the current file system; fall back on regular files. Increase the symlink contents length limit to 8 KiB, this should be big enough for any real use and doesn't crunch the stack. (create_lock_file, lock_file_1, read_lock_data): Simplify allocation of lock file buffers now that they fit in 8 KiB. (lock_file_1): Return error number, not bool. All callers changed. (ELOOP): New macro, if not already defined. (read_lock_data): Return size of lock file contents, not Lisp object. All callers changed. Handle a race condition if some other process replaces a regular-file lock with a symlink lock or vice versa, while we're trying to read the lock. (current_lock_owner): Parse contents more carefully, to help avoid confusing a regular-file lock with some other application's use of the file. Check for lock file contents being too long, or not parsing correctly. (current_lock_owner, lock_file): Allow foreign pid and boot times that exceed the local range. (current_lock_owner, lock_if_free, lock_file): Simplify allocation of lock file contents. * src/w32.c (sys_rename_replace): New function, containing most of the contents of the old sys_rename. (sys_rename): Use it. (fchmod): New dummy function. * src/w32.h (sys_rename_replace, fchmod): New decls. Fixes: debbugs:13807
| * Implement CLASH_DETECTION for MS-Windows.Eli Zaretskii2013-02-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove functions and macros unused on MS-Windows.Eli Zaretskii2013-02-161-2/+0
| | | | | | | | | | | | src/w32.c (sys_chown): Remove unused function. nt/inc/ms-w32.h (chown, logb): Remove, unused.