aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | More debugging aids around GCPROs.Dmitry Antipov2014-09-111-0/+5
| | | | | | | | | | | | * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members. (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7): Minor restyle. If DEBUG_GCPRO, initialize extra fields.
* | * lisp.h (make_local_string): Nitpick indent.Dmitry Antipov2014-09-111-0/+5
| | | | | | | | * print.c (Fprin1_to_string): Remove unused GCPROs.
* | Pacify --enable-gcc-warnings when no window system is used.Paul Eggert2014-09-101-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These warnings found that subscript error, so they seem worthwhile. * composite.c (char_composable_p): Simplify a bit. * frame.c (x_set_frame_parameters): Add an IF_LINT. * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): * window.c (set_window_scroll_bars): Use USE_HORIZONTAL_SCROLL_BARS for simplicity. * frame.h [! USE_HORIZONTAL_SCROLL_BARS]: Ignore -Wsuggest-attribute=const. * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro. (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
* | * charset.c (Fget_unused_iso_final_char): Fix subscript error.Paul Eggert2014-09-101-0/+7
| | | | | | | | | | | | Use check_iso_charset_parameter instead of doing the checks by hand. (check_iso_charset_parameter): Move up. Check parameters a bit more carefully, and return true for 96-char sets. All callers changed.
* | Simplify lisp.h by removing the __COUNTER__ business.Paul Eggert2014-09-101-0/+10
| | | | | | | | | | | | | | | | | | Problem reported by Dmitry Antipov in: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html * lisp.h (make_local_vector, make_local_string) (build_local_string): Simplify by not bothering with __COUNTER__. The __COUNTER__ business wasn't working properly, and was needed only for hypothetical future expansion anyway.
* | * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other terms to ↵Alp Aker2014-09-101-0/+5
| | | | | | | | determine bitmap color. (Bug#18437)
* | src/w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF translation buffer.Eli Zaretskii2014-09-101-0/+5
| |
* | * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.Paul Eggert2014-09-101-0/+4
| |
* | Detect iconified under Compiz/UnityJan Djärv2014-09-101-0/+5
| | | | | | | | | | * xterm.c (handle_one_xevent): Detect iconified by looking at _NET_WM_STATE_HIDDEN.
* | * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.Paul Eggert2014-09-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | These can generate a constant with the correct value but the wrong width, which doesn't work as a printf argument. All uses removed. Problem reported by Dmitry Antipov in: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html (ENUMABLE): Remove; no longer needed. (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): Remove; no longer needed because of the above change. Each definiens moved to the only use.
* | Improve the experimental local and scoped allocation.Paul Eggert2014-09-091-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED) (HAVE_STATEMENT_EXPRESSIONS): New configure-time checks. * src/alloc.c (local_string_init, local_vector_init): New functions, defined if USE_LOCAL_ALLOCATORS. Mostly, these are moved here from lisp.h, as it's not clear it's worth making them inline. * src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false. (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and USE_STACK_LISP_OBJECTS, not on a laundry list. (local_string_init, local_vector_init): New decls. (union Aligned_Cons): New type. (scoped_cons): Use it. Give up on the char trick, as it's a too much of a maintenance hassle; if someone wants this speedup they'll just need to convince their compiler to align properly. Conversely, use the speedup if struct Lisp_Cons happens to be aligned even without a directive. Better yet, help it along by using union Aligned_Cons rather than struct Lisp_Cons. (pointer_valid_for_lisp_object): Remove. This check is not necessary, since make_lisp_ptr is already doing it. All uses removed. (local_vector_init, local_string_init): Move to alloc.c. (build_local_vector): Remove this awkward macro, replacing with ... (make_local_vector): New macro, which acts more like a function. Use statement expressions and use __COUNTER__ to avoid macro capture. Fall back on functions if these features are not supported. (build_local_string, make_local_string): Likewise.
* | Cleanup last change and make all new stuff conditional.Dmitry Antipov2014-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | * lisp.h (build_local_string): Rename to ... (make_local_string): ... this macro. (build_local_string, scoped_list1, scoped_list3): New macros. (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros and functions as such, use regular fallbacks otherwise. * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define conditionally.
* | Add macros to allocate temporary Lisp objects with alloca.Dmitry Antipov2014-09-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Respect MAX_ALLOCA and fall back to regular GC for large objects. * character.h (parse_str_as_multibyte): Move prototype to ... * lisp.h (parse_str_as_multibyte): ... here. (struct Lisp_Cons): Add GCALIGNED attribute if supported. (scoped_cons, scoped_list2, build_local_vector, build_local_string): New macros. (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init) (local_string_init): New functions. * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function. (init_alloc_once): Call it.
* | * xterm.c (x_term_init): Consolidate duplicated code.Dmitry Antipov2014-09-091-0/+7
| | | | | | | | | | | | [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment. (x_delete_terminal): Do not close X connection fd (Bug#18403). Add eassert and mark dpyinfo as dead only if it was alive.
* | Merge from emacs-24; up to 2014-07-08T06:24:07Z!eggert@cs.ucla.eduGlenn Morris2014-09-071-0/+10
|\ \ | |/
| * Fix bug #18419 with disappearing line numbers when minibuffer is resized.Eli Zaretskii2014-09-071-0/+6
| | | | | | | | | | | | src/dispnew.c (prepare_desired_row): When MODE_LINE_P is zero, always make sure the marginal areas of the row are in sync with what the window wants.
| * Fix bug #18331 with "C-h k C-g" not showing documentation on Windows.Eli Zaretskii2014-09-041-0/+6
| | | | | | | | | | | | src/data.c (set_internal): Use assq_no_quit, not Fassq, to find an existing binding of a variable, to avoid silently aborting commands that use specbind.
* | Fix bug uncovered by changing alloca to auto buffer.Paul Eggert2014-09-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * coding.c (growable_destination): New function. (produce_chars): Use it for sanity checks. Do not fiddle with dst_end if the source and destination are both nil, as it's the caller's responsibility to avoid overlap. * keyboard.c (read_decoded_event_from_main_queue): The destination must be MAX_MULTIBYTE_LENGTH times the max source length, not 4 times, to prevent decode_coding_c_string from trying to reallocate a destination. This removes the need for the FIXME. Fixes: debbugs:18410
* | * callproc.c (exec_failed) [DOS_NT]: Define a dummy.Paul Eggert2014-09-071-0/+4
| | | | | | | | | | All callers simplified. Add a comment about exec_failed, vfork, and alloca.
* | Adjust drag-and-drop fix when window is above top.Paul Eggert2014-09-071-0/+7
| | | | | | | | | | | | | | | | * xselect.c (x_fill_property_data): Don't let sign bit of negative XCDR bleed into XCAR's encoded value. Improve checks for out-of-range data while we're at it. Fixes: debbugs:18383
* | * xselect.c (x_fill_property_data): Handle negative XCDR when dataJan Djärv2014-09-071-0/+5
| | | | | | | | | | | | is CONSP. Fixes: debbugs:18303
* | Fix the MS-Windows build broken by SAFE_ALLOCA changes.Eli Zaretskii2014-09-071-0/+7
| | | | | | | | | | | | src/callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if 'alloca' gets passed arguments larger than MAX_ALLOCA. src/font.c (MAX): Define if not defined elsewhere.
* | * keyboard.c (read_decoded_event_from_main_queue): Reinstitute allocaPaul Eggert2014-09-071-1/+7
| | | | | | | | | | | | | | | | 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. * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
* | Use SAFE_ALLOCA etc. to avoid unbounded stack allocation.Paul Eggert2014-09-071-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Fixes: debbugs:18410
* | Remove unused variable EMACS_HEAPSIZE from src/Makefile.in.Eli Zaretskii2014-09-061-1/+5
| | | | | | | | | | src/Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416) ChangeLog: Mention explicitly the removal of EMACS_HEAPSIZE.
* | * xsmfns.c: Initialize ice_fd.Jan Djärv2014-09-041-0/+7
| | | | | | | | | | | | | | * xterm.c (x_term_init): Don't call x_session_initialize if running as a daemon. Fixes: debbugs:18375
* | Less chatter in 'make' output.Paul Eggert2014-09-031-0/+7
| | | | | | | | | | | | | | | | | | * doc/Makefile.in (clean): * oldXMenu/Makefile.in (clean mostlyclean): Simplify, for shorter command line. * src/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.
* | Clean up initialization and customization of horizontal scroll bars.Martin Rudalics2014-09-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-initialize): Remove horizontal-scroll-bars from frame-initial-frame-alist. * scroll-bar.el (previous-horizontal-scroll-bar-mode) (horizontal-scroll-bar-mode-explicit) (set-horizontal-scroll-bar-mode, get-horizontal-scroll-bar-mode) (toggle-horizontal-scroll-bar): Remove. (horizontal-scroll-bar-mode): Remove defcustom. (horizontal-scroll-bar-mode): Fix doc-string. (scroll-bar-toolkit-scroll) (scroll-bar-toolkit-horizontal-scroll): Add doc-strings stubs. * 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.
* | Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ruGlenn Morris2014-09-021-0/+22
|\ \ | |/
| * Fix bug #18384 with incorrect reporting of row number by posn-col-row.Eli Zaretskii2014-09-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | lisp/subr.el (posn-col-row): Revert the change from commit 2010-11-13T21:07:58Z!eliz@gnu.org, which was inadvertently merged from emacs-23 release branch in 2010-11-18T03:54:14Z!monnier@iro.umontreal.ca, and introduced an off-by-one error in the reported row when there is a header line. src/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.
| * * eval.c (internal_lisp_condition_case): Don't overrun the stackPaul Eggert2014-09-011-0/+5
| | | | | | | | when configured --with-wide-int on typical 32-bit platforms.
| * Fix cursor display on the fringe of R2L screen lines.Eli Zaretskii2014-08-311-0/+6
| | | | | | | | | | | | src/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.
| * * src/conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)Ken Brown2014-08-301-0/+5
| |
| * Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.Eli Zaretskii2014-08-281-0/+5
| | | | | | | | | | | | Back-ported from trunk revision-id: 2014-08-27T19:40:54Z!eliz@gnu.org src/syntax.c (scan_lists): Don't examine positions before BEGV.
* | Minor cleanup of recent strlen-avoiding patch.Paul Eggert2014-09-021-0/+8
| | | | | | | | | | | | | | * src/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.
* | * buffer.h (decode_buffer): New function.Dmitry Antipov2014-09-021-0/+8
| | | | | | | | | | | | | | | | | | * 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.
* | * callproc.c (egetenv_internal): Add arg and rename from egetenv ...Dmitry Antipov2014-09-021-0/+3
| | | | | | | | | | * lisp.h (egetenv): ... because of a new inline function used to avoid calls to strlen for a compile-time constants.
* | * fileio.c (CHECK_LENGTH): New macro.Dmitry Antipov2014-09-021-0/+6
| | | | | | | | | | (Fexpand_file_name): Use it and get rid of a few more calls to strlen and strcat.
* | Avoid extra calls to strlen in filesystem I/O routines.Dmitry Antipov2014-09-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | src/w32proc.c (w32_compare_strings): Support "C" and "POSIX" locales.Eli Zaretskii2014-09-011-0/+5
| |
* | Fix typo in previous change's ChangeLog.Paul Eggert2014-09-011-1/+1
| |
* | --enable-silent-warnings now suppresses more chatter.Paul Eggert2014-09-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * INSTALL, etc/NEWS: Document this. * lib-src/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. (regex.o, etags${EXEEXT}, ctags${EXEEXT}, ebrowse${EXEEXT}) (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT}) (pop.o, emacsclient${EXEEXT}, emacsclientw${EXEEXT}) (emacsclientw${EXEEXT}, ntlib.o, hexl${EXEEXT}) (update-game-score${EXEEXT}): Use them. * lwlib/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_) (am__v_CC_0, am__v_CC_1): New macros, taken from Automake. (.c.o): Use them. * oldXMenu/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_) (am__v_CC_0, am__v_CC_1): New macros, taken from Automake. (.c.o): Use them. * src/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.Paul Eggert2014-08-311-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs. While we're at it, don't disable -Wlogical-op either. * src/bytecode.c: Include blockinput.h and keyboard.h rather than rolling their APIs by hand. * src/emacs.c: Include regex.h and rely on its and lisp.h's API rather than rolling them by hand. * src/lastfile.c: Include lisp.h, to check this file's API. * src/lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static): New decls. * src/regex.h (re_max_failures): New decl. * src/unexcw.c, src/unexmacosx.c, src/unexw32.c: Rely on lisp.h's API rather than rolling it by hand. * src/vm-limit.c (__after_morecore_hook, __morecore, real_morecore): Declare at top level, to pacify GCC -Wnested-externs.
* | Fix cursor drawing in hscrolled R2L screen lines.Eli Zaretskii2014-08-311-0/+9
| | | | | | | | | | | | | | | | | | src/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.
* | Fix bug#18368 with broken build on AIX due to HYBRID_MALLOC changes.Ken Brown2014-08-301-0/+6
| | | | | | | | | | | | * src/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)
* | Vector-sorting fixes.Paul Eggert2014-08-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. * admin/merge-gnulib (GNULIB_MODULES): Add vla. * configure.ac (qsort_r): Remove, as we no longer use qsort-like functions. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/vla.h, m4/vararrays.m4: New files, copied from gnulib. * lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating: 2014-08-29 qsort_r: new module, for GNU-style qsort_r The previous two files' changes are boilerplate generated by admin/merge-gnulib, and should not affect Emacs. * src/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. Fixes: debbugs:18361
* | * sysdep.c (str_collate): Clear errno just before wcscoll(_l).Paul Eggert2014-08-301-0/+6
| | | | | | | | | | One can't hoist this out of the 'if', because intervening calls to newlocale, twolower, etc. can change errno.
* | Minor ChangeLog fixes.Eli Zaretskii2014-08-301-1/+1
| |
* | Improve error checking and error messages in string-collation functions.Eli Zaretskii2014-08-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | src/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. src/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.
* | * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.Michael Albinus2014-08-291-4/+8
| |