]> code.delx.au - gnu-emacs/blobdiff - src/ChangeLog
Fix the MS-Windows build broken by SAFE_ALLOCA changes.
[gnu-emacs] / src / ChangeLog
index b5831d811d5ff1ce03de3d9d79af91723d8e7f3a..acb8eed47227849f6a124b0de2b5232385782ac1 100644 (file)
@@ -1,3 +1,657 @@
+2014-09-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
+       'alloca' gets passed arguments larger than MAX_ALLOCA.
+
+       * font.c (MAX): Define if not defined elsewhere.
+
+2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
+       here for destination buffer, to work around what appears to be a
+       bug in decode_coding_c_string when the source and destination are
+       both C strings.
+
+       Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
+       This follows up on the recent thread in emacs-devel on alloca; see:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
+       This patch also cleans up alloca-related glitches noted while
+       examining the code looking for unbounded alloca.
+       * alloc.c (listn):
+       * callproc.c (init_callproc):
+       Rewrite to avoid need for alloca.
+       * buffer.c (mouse_face_overlay_overlaps)
+       (report_overlay_modification):
+       * buffer.h (GET_OVERLAYS_AT):
+       * coding.c (make_subsidiaries):
+       * doc.c (Fsnarf_documentation):
+       * editfns.c (Fuser_full_name):
+       * fileio.c (Ffile_name_directory, Fexpand_file_name)
+       (search_embedded_absfilename, Fsubstitute_in_file_name):
+       * fns.c (Fmake_hash_table):
+       * font.c (font_vconcat_entity_vectors, font_update_drivers):
+       * fontset.c (fontset_pattern_regexp, Ffontset_info):
+       * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
+       (xrdb_get_resource, x_get_resource_string):
+       * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
+       * ftxfont.c (ftxfont_draw):
+       * image.c (xbm_load, xpm_load, jpeg_load_body):
+       * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
+
+       * keymap.c (Fdescribe_buffer_bindings, describe_map):
+       * lread.c (openp):
+       * menu.c (digest_single_submenu, find_and_call_menu_selection)
+       (find_and_return_menu_selection):
+       * print.c (PRINTFINISH):
+       * process.c (Fformat_network_address):
+       * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
+       * search.c (search_buffer, Fmatch_data, Fregexp_quote):
+       * sound.c (wav_play, au_play):
+       * syntax.c (skip_chars):
+       * term.c (tty_menu_activate, tty_menu_show):
+       * textprop.c (get_char_property_and_overlay):
+       * window.c (Fset_window_configuration):
+       * xdisp.c (safe__call, next_overlay_change, vmessage)
+       (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
+       * xfaces.c (face_at_buffer_position):
+       * xmenu.c (x_menu_show):
+       Use SAFE_ALLOCA etc. instead of plain alloca, since the
+       allocation size isn't bounded.
+       * callint.c (Fcall_interactively): Redo memory_full check
+       so that it can be done at compile-time on some platforms.
+       * coding.c (MAX_LOOKUP_MAX): New constant.
+       (get_translation_table): Use it.
+       * callproc.c (call_process): Use SAFE_NALLOCA instead of
+       SAFE_ALLOCA, to catch integer overflows on size calculation.
+       (exec_failed) [!DOS_NT]: New function.
+       (child_setup) [!DOS_NT]: Use it.
+       * editfns.c (Ftranspose_regions):
+       Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
+       * editfns.c (check_translation):
+       Allocate larger buffers on the heap.
+       * eval.c (internal_lisp_condition_case):
+       Check for MAX_ALLOCA overflow.
+       * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
+       (Fbase64_encode_region, Fbase64_decode_region):
+       Avoid unnecessary calls to SAFE_FREE before 'error'.
+       * buffer.c (mouse_face_overlay_overlaps):
+       * editfns.c (Fget_pos_property, check_translation):
+       * eval.c (Ffuncall):
+       * font.c (font_unparse_xlfd, font_find_for_lface):
+       * ftfont.c (ftfont_drive_otf):
+       * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
+       (menu_bar_items, tool_bar_items):
+       * sound.c (Fplay_sound_internal):
+       * xdisp.c (load_overlay_strings, dump_glyph_row):
+       Use an ordinary auto buffer rather than alloca, since the
+       allocation size is fixed and small.
+       * ftfont.c: Include <c-strcase.h>.
+       (matching_prefix): New function.
+       (get_adstyle_property): Use it, to avoid need for alloca.
+       * keyboard.c (echo_add_key):
+       * keymap.c (describe_map): Use ptrdiff_t, not int.
+       * keyboard.c (echo_add_key): Prefer sizeof to strlen.
+       * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
+       when counting bytes.
+       * lisp.h (xlispstrdupa): Remove, replacing with ...
+       (SAFE_ALLOCA_STRING): ... new macro with different API.
+       This fixes a portability problem, namely, alloca result
+       passed to another function.  All uses changed.
+       (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
+       not MAX_ALLOCA - 1.
+       * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
+       (REGEX_ALLOCATE): New macros.
+       (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
+       (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
+       Use them.
+       * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
+       by hand.
+       (decode_mode_spec_coding): Store directly into buf rather than
+       into an alloca temporary and copying the temporary to the buf.
+
+2014-09-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used.  (Bug#18416)
+
+2014-09-04  Jan D  <jhd@f20.localdomain>
+
+       * xterm.c (x_term_init): Don't call x_session_initialize if running
+       as a daemon (Bug#18375).
+
+       * xsmfns.c: Initialize ice_fd.
+
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Less chatter in 'make' output.
+       * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
+       (am__v_at_, am__v_at_0, am__v_at_1):  New macros, taken from Automake.
+       ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
+
+2014-09-03  Martin Rudalics  <rudalics@gmx.at>
+
+       * buffer.c (scroll-bar-height): Fix typo in doc-string.
+       * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove
+       variable.
+       * nsfns.m (Fx_create_frame):
+       * w32fns.c (Fx_create_frame):
+       * xfns.c (Fx_create_frame): Default horizontal scroll bars to
+       nil.
+
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
+       the reported row in the case of a window with a header line, by
+       improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
+       eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.  (Bug#18384)
+
+2014-09-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * eval.c (internal_lisp_condition_case): Don't overrun the stack
+       when configured --with-wide-int on typical 32-bit platforms.
+
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
+       when HPOS is negative, for the benefit of R2L glyph rows whose
+       newline overflows into the fringe.
+
+2014-09-03  Ken Brown  <kbrown@cornell.edu>
+
+       * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.  (Bug#18366)
+
+2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor cleanup of recent strlen-avoiding patch.
+       * fileio.c (CHECK_LENGTH): Remove.
+       Rewrite callers so that they don't need it.
+       (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
+       variable wasn't set.
+
+2014-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * fileio.c (CHECK_LENGTH): New macro.
+       (Fexpand_file_name): Use it and get rid of a few more calls
+       to strlen and strcat.
+       * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
+       * lisp.h (egetenv): ... because of a new inline function used to
+       avoid calls to strlen for a compile-time constants.
+
+       * buffer.h (decode_buffer): New function.
+       * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
+       (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
+       (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
+       * data.c (Flocal_variables_p):
+       * fileio.c (Fverify_visited_file_modtime):
+       * marker.c (live_buffer): Use it.
+
+2014-09-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid extra calls to strlen in filesystem I/O routines.
+       * fileio.c (Fexpand_file_name): Avoid calls to strlen if
+       the length of 'newdir' is known or may be precalculated.
+       (file_accessible_directory_p): Prefer to pass Lisp_Object,
+       not 'char *', and so use precalculated length.
+       (Ffile_accessible_directory_p):
+       * callproc.c (encode_current_directory, init_callproc):
+       * charset.c (init_charset):
+       * lread.c (load_path_check, load_path_default): Adjust users.
+       * lisp.h (file_accessible_directory_p): Tweak prototype.
+
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
+       locales.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
+       (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
+       (am__v_CCLD_1): New macros, taken from Automake.
+       (.c.o, .m.o, temacs$(EXEEXT)): Use them.
+
+       Clean up extern decls a bit.
+       * bytecode.c: Include blockinput.h and keyboard.h rather
+       than rolling their APIs by hand.
+       * emacs.c: Include regex.h and rely on its and lisp.h's API
+       rather than rolling them by hand.
+       * lastfile.c: Include lisp.h, to check this file's API.
+       * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
+       New decls.
+       * regex.h (re_max_failures): New decl.
+       * unexcw.c, unexmacosx.c, unexw32.c:
+       Rely on lisp.h's API rather than rolling it by hand.
+       * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
+       Declare at top level, to pacify GCC -Wnested-externs.
+
+2014-08-31  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
+       clipping rectangle become negative (i.e. large positive, since
+       it's an unsigned data type).  This can happen in R2L hscrolled
+       glyph rows, and caused us to draw the cursor glyph on the fringe.
+       For the details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
+
+2014-08-31  Ken Brown  <kbrown@cornell.edu>
+
+       * gmalloc.c: Don't include <stdlib.h>.  Declare system malloc and
+       friends before defining hybrid_malloc and friends if HYBRID_MALLOC
+       is defined.  (Bug#18368)
+
+2014-08-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Vector-sorting fixes (Bug#18361).
+       It's not safe to call qsort or qsort_r, since they have undefined
+       behavior if the user-specified predicate is not a total order.
+       Also, watch out for garbage-collection while sorting vectors.
+       * fns.c: Include <vla.h>.
+       (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
+       (sort_vector_compare): Remove, replacing with ....
+       (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
+       ... these new functions.
+       (sort_vector): Rewrite to use the new functions.
+       GCPRO locals, since the predicate can invoke the GC.
+       Since it's in-place return void; caller changed.
+       (merge): Use 'inorder', for clarity.
+
+       * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
+       One can't hoist this out of the 'if', because intervening calls to
+       newlocale, twolower, etc. can change errno.
+
+2014-08-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
+       wording of the error messages.
+       (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
+       sets errno.
+
+       * w32proc.c (get_lcid_callback): Accept locale specifications
+       without the country part, as in "enu" vs "enu_USA".
+       (w32_compare_strings): Signal an error if a locale was specified,
+       but couldn't be translated into a valid LCID.
+
+2014-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
+
+2014-08-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
+       errno after towlower_l.  errno's value is not specified after
+       towlower_l.  Instead, assume that towlower_l returns its argument
+       on failure, which is portable in practice.
+
+2014-08-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
+
+       * w32proc.c (w32_compare_strings): Accept additional argument
+       IGNORE_CASE.  Set up the flags for CompareStringW to ignore case
+       if requested.  If w32-collate-ignore-punctuation is non-nil, add
+       NORM_IGNORESYMBOLS to the flags.
+       (LINGUISTIC_IGNORECASE): Define if not already defined.
+       (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
+
+       * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
+       change.
+
+2014-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
+       Define substitutes for platforms that lack them.
+       (str_collate): Add arguments locale and ignore_case.
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
+       Add optional arguments LOCALE and IGNORE-CASE.
+
+       * lisp.h (str_collate): Adapt argument list.
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Add vectors support to Fsort.
+       * fns.c (sort_vector, sort_vector_compare): New functions.
+       (sort_list): Likewise, refactored out of ...
+       (Fsort): ... adjusted user.  Mention vectors in docstring.
+       (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
+       * alloc.c (make_save_int_obj): New function.
+       * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
+       (make_save_int_obj): Add prototype.
+
+       Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
+       * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
+       Conditionally define to match system's qsort_r signature.
+       (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
+
+2014-08-28  Ken Brown  <kbrown@cornell.edu>
+
+       Add support for HYBRID_MALLOC, allowing the use of gmalloc before
+       dumping and the system malloc after dumping.  (Bug#18222)
+
+       * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
+       Define as macros, expanding to hybrid_malloc, etc.
+       (HYBRID_GET_CURRENT_DIR_NAME): New macro.
+       (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
+       macro.
+       * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
+       full implementation on Cygwin.  Remove Cygwin-specific code that
+       is no longer needed.
+       (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
+       Redefine as macros expanding to gmalloc, grealloc, etc.
+       (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
+       (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
+       (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
+       (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
+       [HYBRID_MALLOC]:
+       (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
+       (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: New functions.
+       * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
+       hybrid_aligned_alloc; declare.
+       (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: Define.
+       (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
+       * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
+       Define as macro, expanding to gget_current_dir_name, and define
+       the latter.
+       * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
+       malloc_enable_thread().  Don't initialize malloc.
+       * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
+       no longer defined on Cygwin).
+       (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
+       * sheap.c (bss_sbrk_buffer_end): New variable.
+       * unexcw.c (__malloc_initialized): Remove variable.
+       * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
+       SYSTEM_MALLOC.
+       * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
+       Vmemory_full.
+
+2014-08-28  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click): In
+       `event->y' return entire range (the size of the scroll bar minus
+       that of the thumb).
+       * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
+       return entire range (the scaled size of the scroll bar minus
+       that of the slider).  In `portion' return the scaled position of
+       the slider.
+       (xaw_jump_callback): Restore part of code for vertical scroll
+       bar broken in change from 2014-07-27.
+       (xaw_scroll_callback): Provide incremental scrolling with
+       horizontal scroll bars.
+
+2014-08-28  Eli Zaretskii  <eliz@gnu.org>
+
+       * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
+
+       * indent.c (Fvertical_motion): Fix vertical motion up through a
+       display property after a newline.  (Bug#18276)
+
+       * xdisp.c (display_line): Don't assume that the call to
+       reseat_at_next_visible_line_start ends up at a character
+       immediately following the newline on the previous line.  Avoids
+       setting the ends_at_zv_p flag on screen lines that are not at or
+       beyond ZV, which causes infloop in redisplay.  For the details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
+
+       * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
+       coordinate for hscrolled R2L screen lines.  (Bug#18277)
+
+2014-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
+       (Bug#18051).
+
+2014-08-27  Eli Zaretskii  <eliz@gnu.org>
+
+       * syntax.c (scan_lists): Don't examine positions before BEGV.
+       (Bug#18339)
+
+2014-08-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve robustness of new string-collation code (Bug#18051).
+       * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
+       (newlocale, wcscoll_l): Define substitutes for platforms that
+       lack them, so as to simplify the mainline code.
+       (str_collate): Simplify the code by assuming the above definitions.
+       Use wcscoll_l, not uselocale, as uselocale is too fragile.  For
+       example, the old version left the Emacs in the wrong locale if
+       wcscoll reported an error.  Use 'int', not ptrdiff_t, for the int
+       result.  Report an error if newlocale fails.
+
+2014-08-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       * lisp.h (str_collate):
+       * sysdep.c (str_collate): Return int.
+       (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
+
+2014-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix some glitches in previous change.
+       * sysdep.c (stack_direction): Replace stack_grows_down
+       to simplify calculation of stack boundaries.
+       (handle_sigsegv): Check whether we really crash somewhere near
+       to stack boundary, and handle fatal signal as usual if not.
+       (init_sigsegv): Adjust accordingly.
+       * keyboard.c (Vtop_level_message): Rename to
+       Vinternal__top_level_message, as suggested by Stefan Monnier in
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
+       All related users changed.
+
+2014-08-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Handle C stack overflow caused by too nested Lisp evaluation.
+       * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
+       siglongjmp point to transfer control from SIGSEGV handler.
+       * keyboard.c (return_to_command_loop, recover_top_level_message)
+       [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
+       (regular_top_level_message): New variable.
+       (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
+       exit from SIGSEGV handler and adjust message displayed by Vtop_level
+       if appropriate.
+       (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
+       new variables described above.
+       * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
+       (stack_grows_down, sigsegv_stack, handle_sigsegv)
+       [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
+       (init_sigsegv): New function.
+       (init_signals): Use it.
+
+2014-08-25  Ken Brown  <kbrown@cornell.edu>
+
+       * emacs.c (main): Remove use of obsolete macro
+       G_SLICE_ALWAYS_MALLOC.
+
+2014-08-25  Eli Zaretskii  <eliz@gnu.org>
+
+       Implement locale-sensitive string collation for MS-Windows.
+       * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
+       New functions.  (Bug#18051)
+
+       * w32.h (w32_compare_strings): Add prototype.
+
+       * w32.c <g_b_init_compare_string_w>: New global flag.
+       (globals_of_w32): Initialize it.
+
+       * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
+       [WINDOWSNT]: Call str_collate on MS-Windows.
+
+2014-08-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       One more minor cleanup of font subsystem.
+       * font.h (struct font_driver): Convert text_extents to
+       return void because returned value is never actually used.
+       * macfont.m (macfont_text_extents):
+       * w32font.c (w32font_text_extents):
+       * xftfont.c (xftfont_text_extents): Adjust to return void
+       and assume that 'metrics' argument is always non-NULL.
+       * ftfont.c (ftfont_text_extents):
+       * xfont.c (xfont_text_extents): Likewise.  Avoid redundant memset.
+
+2014-08-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor cleanups of str_collate fix (Bug#18051).
+       * fns.c (str_collate): Move decl from here ...
+       * lisp.h (str_collate): ... to here.
+       * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
+       Remove unnecessary casts.  Use SAFE_NALLOCA to avoid
+       potential problems with integer overflow.  Don't assume
+       setlocale succeeds.  Remove unnecessary test before restoring
+       locale via setlocale, and free the copied setlocale string
+       when done with it.
+
+2014-08-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
+
+       * sysdep.c (str_collate): New function.  (Bug#18051)
+
+2014-08-23  Karol Ostrovsky  <karol.ostrovsky@gmail.com>  (tiny change)
+
+       * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
+       if the initial "rm -f" fails.  This is for MinGW builds, where
+       MS-Windows will not allow deleting the executable file of a
+       running program.
+
+2014-08-20  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_scroll_bar_handle_click)
+       (w32_horizontal_scroll_bar_handle_click)
+       (x_scroll_bar_report_motion)
+       (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
+       SB_THUMBTRACK, use the 32-bit position information returned by
+       GetScrollInfo, not the 16-bit information returned in the Windows
+       message sent to us.
+
+2014-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
+       second coordinate ('y') reported for dragging the horizontal
+       scroll bar thumb.
+
+2014-08-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
+       and text area-relative x-coordinates.
+
+2014-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       Avoid overwriting the reversed_p flags in the glyph matrices when
+       init_iterator or start_display are called.
+       * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
+       the glyph row here.
+       (tool_bar_height, redisplay_tool_bar, try_window)
+       (try_window_reusing_current_matrix, try_window_id)
+       (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
+       reversed_p flag of the iterator's glyph row where the glyph row
+       is going to be redrawn.
+
+2014-08-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
+
+2014-08-16  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
+       of emacs_event return length from si.nPage to si.nMax.
+       * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
+       interchange start and end of thumb.
+
+2014-08-15  Ken Brown  <kbrown@cornell.edu>
+
+       * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
+       ERRORCHECK mutexes.  (Bug#18222)
+
+2014-08-12  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (set_menu_bar_lines_1): Remove.
+       (set_menu_bar_lines): Call change_frame_size instead of
+       set_menu_bar_lines_1.
+
+2014-08-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsfns.m (Fx_create_frame): Call adjust_frame_size,
+       set f->official.
+
+2014-08-11  Glenn Morris  <rgm@gnu.org>
+
+       * fileio.c: Revert 2013-01-31 change, which chose coding system for
+       writing before backing up, since it causes a more serious problem
+       than the one it solves.  (Closes Bug#18141, reopens Bug#13522.)
+       (choose_write_coding_system): No longer callable from Lisp.
+       Move last piece back here from Fwrite_region.
+       (Fwrite_region, syms_of_fileio): Update for above changes.
+
+2014-08-11  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
+       (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
+       (Fwindow_new_pixel, Fset_window_new_pixel)
+       (Fset_window_new_total, Fset_window_new_normal)
+       (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
+       See also:
+       http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
+
+2014-08-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * fontset.c (Finternal_char_font): Recompute basic faces if the
+       frame's face cache was cleared.  (Bug#18162)
+
+2014-08-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
+       * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
+       base buffer's undo list.
+
+2014-08-10  Reuben Thomas  <rrt@sc3d.org>
+
+       Fix a couple of recent inadvertent breaks of the MSDOS port.
+       * msdos.c: include required menu.h
+       * term.c: set correct menu_show_hook on MSDOS.
+
+2014-08-10  Martin Rudalics  <rudalics@gmx.at>
+
+       Fix handling of menu bar line on TTY frames (Bug#18136)
+       (Bug#18196).
+       * dispnew.c (handle_window_change_signal):
+       * keyboard.c (Fsuspend_emacs): Call change_frame_size with
+       frame's menu bar lines subtracted from height.
+       * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
+       frames.
+       (adjust_frame_size): Count in menu bar when setting FrameRows.
+       (make_terminal_frame): When setting up the frame's lines and
+       text height don't count in the menu bar.
+       (Fmake_terminal_frame): Call adjust_frame_size with menu bar
+       lines subtracted from height.
+       (do_switch_frame): Set tty's FrameRows to number of total lines
+       of frame.
+       (Fframe_pixel_height, Fframe_pixel_width): If no window system
+       is used, return total number of lines and columns.
+       * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
+       of FRAME_LINES.
+       * term.c (OUTPUT, tty_set_terminal_modes)
+       (tty_set_terminal_window, tty_set_scroll_region)
+       (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
+       (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
+       FRAME_TOTAL_LINES instead of FRAME_LINES.
+       (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
+       Call change_frame_size with frame's menu bar lines subtracted
+       from height.
+       * w32console.c (w32con_clear_to_end, w32con_clear_frame)
+       (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
+       FRAME_LINES.
+
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
+
+       * alloc.c (Fmemory_info): Remove a stray brace.
+
+       * process.c: Fix a comment typo.
+
+       * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
+
 2014-08-09  Jan Djärv  <jan.h.d@swipnet.se>
 
        * widgetprv.h (EmacsFramePart): Remove font.
 
        * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
        * font.c (font_done_for_face):
-       * xface.c (realize_non_ascii_face): Adjust user.
+       * xfaces.c (realize_non_ascii_face): Adjust user.
        * font.h (struct font_driver): Convert 'prepare_face' to return
        void because its return value is never used anyway.
        * xfont.c (xfont_prepare_face): Return void.
 
        Use mmap(2) emulation for allocating buffer text on MS-Windows.
        * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
-       configure.
+       configure, not from HEAPSIZE.
        (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
 
        * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero