aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | The lock for FILE is now .#FILE or .#-FILE.Paul Eggert2013-03-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old approach, which fell back on DIR/.#FILE.0 through DIR/.#FILE.9, had race conditions that could not be easily fixed. If DIR/.#FILE is a non-symlink file, Emacs now does not create a lock file for DIR/FILE; that is, DIR/FILE is no longer partly protected by a lock if DIR/.#FILE is a non-symlink file ("partly" because the locking mechanism was never reliable in that case). This patch fixes this and other bugs discovered by a code inspection that was prompted by <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>. Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows, to avoid interoperability problems between the MS-Windows and non-MS-Windows implementations. MS-Windows and non-MS-Windows instances of Emacs now ignore each others' locks. * etc/NEWS: Document this. * src/filelock.c (defined_WINDOWSNT): New constant. (MAKE_LOCK_NAME, fill_in_lock_file_name): Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE regular files on MS-Windows hosts. (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p): Use SAFE_ALLOCA to avoid problems with long file names. (MAX_LFINFO): Now a local constant, not a global macro. (IS_LOCK_FILE): Remove. (lock_file_1): Don't inspect errno if symlink call succeeds; that's not portable. (lock_file): Document that this function can return if lock creation fails. Fixes: debbugs:13807
* | Merge from emacs-24; up to 2012-12-23T17:06:58Z!eliz@gnu.orgGlenn Morris2013-03-021-0/+4
|\ \ | |/
| * Fixes: debbugs:13734Andreas Schwab2013-03-021-0/+4
| | | | | | | | * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren.
* | * textprop.c: Use bool for booleans.Paul Eggert2013-03-021-0/+6
| | | | | | | | | | (validate_interval_range, Fadd_text_properties) (Fremove_text_properties): Prefer bool to int when either works.
* | Protect against changes of interval tree when adding/removing text props.Eli Zaretskii2013-03-021-0/+7
| | | | | | | | | | | | | | src/textprop.c (Fadd_text_properties, Fremove_text_properties): If the interval tree changes as a side effect of calling modify_region, re-do processing starting from the call to validate_interval_range. (Bug#13743)
* | Revert last commit; fixed on emacs-24 branch instead.Eli Zaretskii2013-03-021-4/+0
| |
* | Fix bug #13734 with errors in lisp.h macro expansion.Eli Zaretskii2013-03-021-0/+4
| | | | | | | | src/lisp.h (XPNTR) [!USE_LSB_TAG]: Fix parentheses nesting.
* | Merge from emacs-24; up to 2012-12-23T02:41:17Z!rgm@gnu.orgGlenn Morris2013-02-271-0/+5
|\ \ | |/
| * w32.c (sys_open): Don't reset the flags for FD in fd_info[].Eli Zaretskii2013-02-271-0/+5
| | | | | | | | Related to bug #13546.
* | Fix race conditions with MS-Windows lock files by using _sopen.Eli Zaretskii2013-02-271-0/+7
| | | | | | | | | | | | | | | | src/filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with _SH_DENYRW flag, instead of emacs_open, to deny any other process access to the lock file until it is written and closed. Fixes: debbugs:13807
* | Qcall_interactively and Qexecute_kbd_macro are now static.Paul Eggert2013-02-261-0/+6
| |
* | * window.c (Frecenter): Tiny docstring enhancement.Bastien Guerry2013-02-261-0/+4
| |
* | Minor textprop integer cleanup.Paul Eggert2013-02-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * intervals.h, textprop.c (add_text_properties_from_list): Return void, not int, since nobody uses the return value. * textprop.c (validate_plist, add_properties, remove_properties) (Fadd_text_properties): Don't assume list length fits in int. (interval_has_all_properties, interval_has_some_properties) (interval_has_some_properties_list, add_properties, remove_properties) (Fadd_text_properties, Fremove_text_properties) (Fremove_list_of_text_properties, text_property_stickiness): Use bool for booleans. (Fadd_text_properties, Fremove_text_properties): (Fremove_list_of_text_properties): Reindent do-while as per GNU style.
* | Implement CLASH_DETECTION for MS-Windows.Eli Zaretskii2013-02-251-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix bug #13743 with crashes due to recursive add-text-properties.Eli Zaretskii2013-02-251-0/+9
| | | | | | | | | | | | | | | | | | src/textprop.c (Fadd_text_properties, Fremove_text_properties) (Fremove_list_of_text_properties): Skip all of the intervals in the region between START and END that already have resp. don't have the requested properties, not just the first one. Add assertions that the loop afterwards always modifies the properties.
* | * src/callint.c (Fcall_interactively): Use the right lexical environmentStefan Monnier2013-02-251-0/+6
| | | | | | | | | | | | | | for `interactive' specs. * src/eval.c (Feval): Accept a lexical environment. Fixes: debbugs:13811
* | Simplify data_start configuration.Paul Eggert2013-02-241-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followon simplification to the fix for Bug#13650. * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove. * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START) (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove. (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's not always needed. (HAVE_DATA_START): New macro. * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove. Remove legacy-systems section, as this stuff is no longer applicable with current linking strategies. * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD) (START_FILES): Remove. All uses removed. (otherobj): Remove $(VMLIMIT_OBJ), as it's now first. (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first. (buildobj.h): Use it. ($(ALLOBJS)): Depend on globals.h. (temacs$(EXEEXT)): Use $(ALLOBJS). * src/autodeps.mk (ALLOBJS): Move to Makefile.in. * src/deps.mk (vm-limit.o): * src/makefile.w32-in ($(BLD)/vm-limit.$(O)): Do not depend on mem-limits.h. * src/emacs.c (__do_global_ctors, __do_global_ctors_aux) (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__) [__GNUC__ && !ORDINARY_LINK]: Remove. * src/mem-limits.h, src/pre-crt0.c: Remove. * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h. * src/unexcoff.c (etext): New decl. (make_hdr): Use it instead of start_of_data. * src/vm-limit.c: Move most of mem-limits.h's contents here. (data_start): New decl. It's OK if this is approximate, so simplify-away some unnecessary exactness. (POINTER): Remove; all uses removed. (data_space_start): Now char *, to avoid casts. (exceeds_lisp_ptr): New function, replacing the old EXCEEDS_LISP_PTR macro. All uses changed. (check_memory_limits): Simplify and remove casts. (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove. (memory_warnings): Use data_start instead of start_of_data. Fixes: debbugs:13783
* | Merge from emacs-24; up to 2012-12-22T19:09:52Z!rgm@gnu.orgGlenn Morris2013-02-241-0/+14
|\ \ | |/
| * Fixes: debbugs:13797Andreas Schwab2013-02-241-0/+5
| | | | | | | | | | * xdisp.c (set_message): Only check for debug-on-message if STRING is a string.
| * Fix regression introduced by July 10 filelock.c patch.Paul Eggert2013-02-231-0/+9
| | | | | | | | | | | | | | | | * filelock.c (fill_in_lock_file_name): Fix crash caused by the 2012-07-10 patch to this file. Reported by Eli Zaretskii in <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html> and diagnosed by Andreas Schwab in <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
* | Assume C89 or better.Paul Eggert2013-02-221-0/+8
| | | | | | | | | | | | | | * ralloc.c (SIZE, POINTER, NIL): * vm-limit.c (POINTER): Remove, replacing all uses with C89 equivalents. These old symbols were present only for porting to pre-C89 platforms.
* | Don't call 'select' from emacs_gnutls_pull.Claudio Bley2013-02-221-0/+5
| | | | | | | | | | src/w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop. This avoids warning messages reported as part of Bug#13546.
* | * src/sheap.c (report_sheap_usage): Fix arguments of message1_no_log.Ken Brown2013-02-201-0/+4
| |
* | * src/sheap.c (report_sheap_usage): Prefer message1_nolog.Stefan Monnier2013-02-201-0/+2
| |
* | * lisp/simple.el (command-execute): Move from C. Add obsolete check.Stefan Monnier2013-02-201-2/+11
| | | | | | | | | | | | | | | | (extended-command-history): Move from C. * src/keyboard.c (Qcommand_execute): New var. (command_loop_1, read_char): Use it. (Fcommand_execute): Remove, replace by an Elisp implementation. (syms_of_keyboard): Adjust accordingly.
* | * sheap.c (report_sheap_usage): Use message, not message1, soDaniel Colascione2013-02-191-1/+4
|\ \ | | | | | | | | | | | | that we don't try to create a buffer while we're in the middle of dumping Emacs. Explain why.
| * | 2013-02-19 Daniel Colascione <dancol@dancol.org>Daniel Colascione2013-02-191-0/+6
| | | | | | | | | | | | | | | | | | * sheap.c (report_sheap_usage): Use message, not message1, so that we don't try to create a buffer while we're in the middle of dumping Emacs. Explain why.
* | | * search.c (find_newline): Return byte position in bytepos.Dmitry Antipov2013-02-201-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust comment. (find_next_newline_no_quit, find_before_next_newline): Add bytepos argument. * lisp.h (find_newline, find_next_newline_no_quit) (find_before_next_newline): Adjust prototypes. * bidi.c (bidi_find_paragraph_start): * editfns.c (Fconstrain_to_field, Fline_end_position): * indent.c (compute_motion, vmotion): * xdisp.c (back_to_previous_line_start, forward_to_next_line_start): (get_visually_first_element, move_it_vertically_backward): Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
* | Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ruGlenn Morris2013-02-181-0/+5
|\ \ | |/
| * Avoid leaking handles on MS-Windows.Eli Zaretskii2013-02-181-0/+5
| | | | | | | | | | src/w32proc.c (new_child): Avoid leaking handles if the subprocess resources were not orderly released.
* | Merge from emacs-24; up to 2012-12-20T05:05:41Z!dmantipov@yandex.ruGlenn Morris2013-02-171-0/+6
|\ \ | |/
| * Fix bug #13735 with network streams on MS-Windows.Eli Zaretskii2013-02-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert changes to w32proc.c done since 2012-11-30T09:23:15Z!eliz@gnu.org. Do NOT merge to trunk! src/w32proc.c (new_child): Remove the loop that attempted to salvage slots of dead processes. (new_child, delete_child, find_child_pid): Don't insist on procinfo.hProcess be NULL for a process slot to be considered inactive, or be non-NULL to be considered active. (reader_thread): Don't set the FILE_AT_EOF flag of a file descriptor if the corresponding child was deleted and its char_avail handle is NULL. (reap_subprocess): Don't reset the FILE_AT_EOF flag. (sys_select): Don't pass a NULL process handle to WaitForMultipleObjects. Fixes: debbugs:13735 debbugs:13546
| * Fix bug #13723 with redrawing vertical border in GUI sessions.Eli Zaretskii2013-02-171-0/+6
| | | | | | | | | | | | src/xdisp.c (x_draw_vertical_border): For a window that is neither the leftmost nor the rightmost, redraw both the left and the right vertical borders.
* | Prefer `message1' over `message'.Stefan Monnier2013-02-171-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/xml.c (init_libxml2_functions): * src/sound.c (sound_warning): * src/sheap.c (report_sheap_usage): * src/process.c (wait_reading_process_output): * src/msdos.c (XMenuActivate): * src/macros.c (Fstart_kbd_macro, Fend_kbd_macro): * src/keyboard.c (top_level_1): * src/editfns.c (Fmessage, Fmessage_box): * src/callint.c (Fcall_interactively): * src/fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
* | Move scroll-bar-adjust-thumb-portion.Jan Djärv2013-02-171-0/+6
| | | | | | | | | | | | * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ... * frame.c (syms_of_frame): ... to here.
* | Remove functions and macros unused on MS-Windows.Eli Zaretskii2013-02-161-0/+2
| | | | | | | | | | | | src/w32.c (sys_chown): Remove unused function. nt/inc/ms-w32.h (chown, logb): Remove, unused.
* | Don't use __STDC__ on MS-Windows unless necessary (Bug #9066).Eli Zaretskii2013-02-161-0/+3
| | | | | | | | | | | | nt/inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC. src/w32term.c <input_signal_count>: Declare 'volatile' unconditionally.
* | Don't set h_errno on MS-Windows except in gethostbyname.Eli Zaretskii2013-02-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00293.html and the following discussion for the details. src/w32.c (set_errno): Reset h_errno and don't set it to any other value. Set errno instead. (check_errno): Reset h_errno. (sys_socket, socket_to_fd, sys_bind, sys_connect) (sys_gethostname, sys_getservbyname, sys_getpeername) (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname) (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set h_errno. (sys_gethostbyname): Set h_errno only errors detected.
* | Remove unneeded bits of commit 2013-02-15T09:41:31Z!eliz@gnu.org merged from ↵Eli Zaretskii2013-02-151-10/+1
| | | | | | | | release branch.
* | * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.Paul Eggert2013-02-151-0/+4
| |
* | Fix bug #13720 with auto-save-timeout less than 4 seconds.Eli Zaretskii2013-02-151-0/+3
| | | | | | | | | | src/keyboard.c (read_char): Fix calculation of auto-save time out when auto-save-timeout is less than 4.
* | Merge from emacs-24; up to 2012-12-19T19:51:40Z!monnier@iro.umontreal.caGlenn Morris2013-02-151-0/+24
|\ \ | |/
| * Allow deleted processes to be reaped by SIGCHLD handler on MS-Windows.Eli Zaretskii2013-02-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | src/w32proc.c (new_child): Free up to 2 slots of dead processes at a time. Improve diagnostics in DebPrint. (reader_thread): If cp->char_avail is NULL, set the FILE_AT_EOF flag, so that sys_select could have a chance of noticing that this process is dead, and call a SIGCHLD handler for it. Improve diagnostics in DebPrint. (reap_subprocess): Reset the FILE_AT_EOF flag set by reader_thread. (sys_select): Watch a process whose procinfo.hProcess is non-NULL even if its char_avail is NULL. Allows to reap subprocesses that were forcibly deleted by delete-process. (Bug#13546)
| * Improve error reporting as part of solving bug #13546 on MS-Windows.Eli Zaretskii2013-02-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | src/w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname) (sys_gethostbyname, sys_getservbyname, sys_getpeername) (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname) (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure, make sure errno is set to an appropriate value. (Bug#13546) (socket_to_fd): Add assertion against indexing fd_info[] with a value that is out of bounds. (sys_accept): If fd is negative, do not set up the child_process structure for reading.
* | * composite.c (fill_gstring_header): Remove useless prototype.Dmitry Antipov2013-02-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Break long line. * lisp.h (message_dolog, compile_pattern): Adjust prototype. * print.c (PRINTDECLARE, print_object): * search.c (compile_pattern, fast_looking_at, search_buffer): (simple_search, boyer_moore, Freplace_match): * xdisp.c (c_string_pos, number_of_chars, message_dolog): (get_overlay_arrow_glyph_row, display_mode_element): (decode_mode_spec_coding, message3): * xfaces.c (face_at_string_position): Use bool for booleans. Adjust comments.
* | Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.dePaul Eggert2013-02-141-0/+20
|\ \ | |/
| * Backport GCPRO fix from trunk.Paul Eggert2013-02-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The bug was reported for AIX before today's changes. I reproduced the problem on Fedora 17 x86-64 when setting GC_MARK_STACK by hand, and I presume it occurs with default configurations on HP-UX and Unixware. Trunk fix on 2013-01-14 by Dmitry Antipov <dmantipov@yandex.ru>: Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. * eval.c (eval_sub): Protect `form' from being GCed before its car and cdr becomes protected with the backtrace entry. Fixes: debbugs:13650
| * Fix AIX port.Paul Eggert2013-02-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (DATA_START, DATA_SEG_BITS): Set to 0x20000000 on AIX. (GC_MARK_STACK): Do not set to GC_USE_GCPROS_AS_BEFORE, as that runs afoul of some other bug in Emacs, and the default value GC_MAKE_GCPROS_NOOPS has been tested and works. * src/lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]: Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set, was #undeffed earlier, so it cannot be used as a macro here. Use the constant and not the macro. Tested on AIX. * src/unexaix.c: Revert 2013-02-11 and 2013-02-12 changes to this file. They're almost surely OK but we're just before a release so we should avoid changes unless they're clearly needed. Instead, make the following minor change: (ADDR_CORRECT): New macro. Fixes: debbugs:13650
| * More robust creation of a subprocess, attempt to solve bug #13546.Eli Zaretskii2013-02-131-0/+4
| | | | | | | | | | | | src/w32proc.c (new_child): If no vacant slots are found in child_procs[], make another pass looking for slots whose process has exited or died.
| * Cleanup related to bug #13546 with subprocesses on MS-Windows.Eli Zaretskii2013-02-131-0/+8
| | | | | | | | | | | | | | | | src/w32.c (sys_pipe): When failing due to file descriptors above MAXDESC, set errno to EMFILE. (_sys_read_ahead): Update cp->status when failing to read serial communications input, so that the status doesn't stay at STATUS_READ_IN_PROGRESS.