summaryrefslogtreecommitdiff
path: root/src/w32heap.c
Commit message (Collapse)AuthorAge
* Increase DUMPED_HEAP_SIZEPo Lu2023-01-26
| | | | * src/w32heap.c (DUMPED_HEAP_SIZE): Add 5 megabytes.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
|
* Port recent Gnulib changes to MS-WindowsPaul Eggert2021-10-04
| | | | | | | | | | | * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_free-posix) (OMIT_GNULIB_MODULE_malloc-posix) (OMIT_GNULIB_MODULE_realloc-gnu) (OMIT_GNULIB_MODULE_realloc-posix): New macros, since we don’t want these modules on MS-Windows. * src/w32heap.c (heap_alloc, heap_realloc): New functions. (malloc_after_dump, realloc_after_dump, realloc_before_dump): Use them.
* Merge from origin/emacs-27Glenn Morris2021-05-13
|\ | | | | | | | | | | | | | | | | | | | | bcd92b5708 (origin/emacs-27) Improve documentation of Hexl mode c233f4eccd ; * etc/NEWS: Fix decoded-time-set-defaults typo. 4c3abb3dd1 Fix compilation errors with latest w32 API headers 127f1f330b Improve doc strings in log-edit.el e36183ff46 ; * etc/TODO (etc/DOC): Update the todo entries. # Conflicts: # etc/NEWS
| * Fix compilation errors with latest w32 API headersEli Zaretskii2021-05-09
| | | | | | | | | | | | * src/w32common.h: Rename OS_* to OS_SUBTYPE__*, as w32 API headers started defining OS_NT, which breaks the use of the enumeration. All users changed. (Bug#48303)
| * Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | ; Prefer https to http in more URLsStefan Kangas2020-10-24
| | | | | | | | These were all tested and confirmed working.
* | ; Fix typosStefan Kangas2020-09-21
| |
* | Fix the MS-Windows build broken by "Let the OS clear large new objects"Eli Zaretskii2020-01-03
|/ | | | | | | * src/w32heap.c (sys_calloc): New function, implements calloc in terms of our private implementations of malloc. * nt/inc/ms-w32.h (calloc): Redirect to sys_calloc.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Rename CANNOT_DUMP to HAVE_UNEXECPaul Eggert2019-02-01
| | | | | | | * configure.ac (CANNOT_DUMP): Remove. All uses removed, or changed to the negative of with_unexec. (HAVE_UNEXEC): New macro. All uses of CANNOT_DUMP changed to the negative of this macro.
* Clean up memory allocation and unexec support on MS-WindowsEli Zaretskii2019-01-18
| | | | | | | | | | | | | | | | | | | | | * src/w32heap.c (report_temacs_memory_usage): Condition on !CANNOT_DUMP, in addition to ENABLE_CHECKING. (init_heap): Accept an argument, which tells us what heap allocation method to use. (DUMPED_HEAP_SIZE) [CANNOT_DUMP]: Define to a small value, as we don't use dumped_data[] in this case. * src/w32heap.h (init_heap): Adjust prototype. <using_dynamic_heap>: Remove declaration. * src/emacs.c (main) [WINDOWSNT]: Determine heap allocation method based on whether we are in temacs and whether unexec will be used to dump Emacs. Pass the heap allocation method to init_heap, which is now called after parsing the --temacs=METHOD option. * src/unexw32.c (unexec): Don't fiddle with using_dynamic_heap. <using_dynamic_heap>: Remove definition. * src/w32proc.c (malloc_before_init, realloc_before_init) (free_before_init): New functions, to catch memory allocation before heap allocation method is set up.
* Add portable dumperDaniel Colascione2019-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new portable dumper as an alternative to unexec. Use it by default. * src/dmpstruct.awk: New file. * src/doc.c (get_doc_string): use will_dump_p(). * src/editfns.c (styled_format): silence compiler warning with UNINIT. * src/emacs-module.c (syms_of_module): staticpro ltv_mark. * src/emacs.c (gflags): new variable. (init_cmdargs): unwrap (string_starts_with_p, find_argument, dump_error_to_string) (load_pdump): new functions. (main): detect pdumper and --temacs invocation; actually load portable dump when detected; set gflags as appropriate; changes to init functions throughout to avoid passing explicit 'initialized' argument. * src/eval.c (inhibit_lisp_code): remove unused variable. (init_eval_once_for_pdumper): new function. (init_eval_once): call it. * src/filelock.c: CANNOT_DUMP -> will_dump_p() * src/fingerprint-dummy.c: new file * src/fingerprint.h: new file * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc. (weak_hash_tables): remove (hashfn_equal, hashfn_eql): un-staticify (make_hash_table): set new 'next_weak' hash table field; drop global weak_hash_tables logic. (copy_hash_table): drop global weak_hash_tables logic. (hash_table_rehash): new function. (hash_lookup, hash_put, hash_remove_from_table, hash_clear): rehash if needed. (sweep_weak_table): un-staticify; explain logic; bool-ify. (sweep_weak_hash_tables): remove function. * src/font.c (syms_of_font): remember pdumper stuff. * src/fontset.c (syms_of_fontset): remember pdumper stuff. * src/frame.c (make_initial_frame): don't reset Vframe_list. (init_frame_once_for_pdumper, init_frame_once): new functions. (syms_of_frame): remove redundant staticpro. * src/fringe.c (init_fringe_once_for_pdumper): new functin. (init_fringe_once): call it. * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function. (syms_of_ftcrfont): call it. * src/ftfont.c (syms_of_ftfont_for_pdumper): new function. (syms_of_ftfont): call it. * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function. (syms_of_ftxfont): call it. * src/gmalloc.c: adjust for pdumper througout (DUMPED): remove weird custom dumped indicator. * src/gnutls.c (syms_of_gnutls): pdumper note for gnutls_global_initialized. * src/image.c (syms_of_image): add pdumper comment, initializer note. * src/insdel.c (prepare_to_modify_buffer_1): account for buffer contents possibly being in dump image. * src/keyboard.c (syms_of_keyboard_for_pdumper): new function. (syms_of_keyboard): staticpro more; call pdumper syms function. * src/lisp.h: add comments throughout (gflags): declare. (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p) (dumped_with_pdumper_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): new functions. (POWER_OF_2, ROUNDUP): move macros. (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header pointer instead of vector; constify. (Lisp_Hash_Table): add comment about need to rehash on access; add comment for next_weak. (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify. (hash_table_rehash): declare. (hash_rehash_needed_p, hash_rehash_if_needed): new functions. (finalizers, doomed_finalizers): declare extern. (SUBR_SECTION_ATTRIBUTE): new macro. (staticvec, staticidx): un-static-ify. (sweep_weak_hash_tables): remove declaration. (sweep_weak_table): declare. (hashfn_eql, hashfn_equal): declare. (number_finalizers_run): new variable. (Vdead): externify when ENABLE_CHECKING. (gc_root_type): new enumeration. (gc_root_visitor): new struct. (visit_static_gc_roots): declare. (vectorlike_nbytes): declare. (vector_nbytes): define as trivial inline function wrapper for vectorlike_nbytes. (init_obarray_once): change signature. (primary_thread): extern-ify. (init_buffer): change signature. (init_frame_once): declare. * src/lread.c (readevalloop): adjust for new dumped predicates. (init_obarray_once): new function. (ndefsubr): new variable. (defsubr): increment it. (load_path_check): adjust for pdumper. (load_path_default): use pdumper functions; adjust for dump search. * src/macfont.m (macfont_init_font_change_handler): avoid shadowing global. (syms_of_macfont_for_pdumper): new function. (syms_of_macfont): call it. * src/menu.c (syms_of_menu): staticpro more stuff. * src/minibuf.c (Ftry_completion): rehash if needed. (init_minibuf_once_for_pdumper): new function. (init_minibuf_once): call it. * src/nsfont.m (syms_of_nsfns): staticpro more. * src/nsfont.m (syms_of_nsfont_for_pdumper): new function. (syms_of_nsfont): call it. * src/nsterm.m (syms_of_nsfont): remember pdumper stuff. * src/pdumper.c: new file. * src/pdumper.h: new file. * src/process.c (init_process_emacs): use new pdumper functions instead of CANNOT_DUMP. * src/profiler.c (syms_of_profiler_for_pdumper): new function. (syms_of_profiler_for_pdumper): call it. * src/search.c (syms_of_search_for_pdumper): new function. (syms_of_search_for_pdumper): call it. * src/sheap.c (bss_sbrk_did_unexec): remove. * src/sheap.h (bss_sbrk_did_unexec): remove. * src/syntax.c (syms_of_syntax): don't redundantly staticpro re_match_object. * src/sysdep.c: use will_dump_with_unexec_p() instead of bss hack thing. * src/syssignals.h (init_sigsegv): declare. * src/systime.h (init_timefns): remove bool from signature. * src/textprop.c (syms_of_textprop): move staticpro. * src/thread.c (main_thread_p): constify. * src/thread.h (main_thread_p): constify. * src/timefns.c (init_timefns): remove bool from signature. (syms_of_timefns_for_pdumper): new function. (syms_of_timefns): call it. * src/w32.c: rearrange code. * src/w32.h (w32_relocate): declare. * src/w32fns.c (syms_of_w32fns): add pdumper note. * src/w32font.c (syms_of_w32font_for_pdumper): new function. (syms_of_w32font): call it. * src/w32heap.c (using_dynamic_heap): new variable. (init_heap): use it. * src/w32menu.c (syms_of_w32menu): add pdumper note. * src/w32proc.c (ctrl_c_handler, mainCRTStartup, _start, open_input_file) (rva_to_section, close_file_data): move here. * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): new function. (syms_of_w32uniscribe): call it. * src/window.c (init_window_once_for_pdumper): new function. (init_window_once): call it; staticpro more stuff. * src/xfont.c (syms_of_xfont_for_pdumper): new function. (syms_of_xfont): call it. * src/xftfont.c (syms_of_xftfont_for_pdumper): new function. (syms_of_xftfont): call it. * src/xmenu.c (syms_of_xmenu_for_pdumper): new function. (syms_of_xmenu): call it. * src/xselect.c (syms_of_xselect_for_pdumper): new function. (syms_of_xselect): call it. * src/xsettings.c (syms_of_xsettings): add more pdumper notes. * src/term.c (syms_of_xterm): add pdumper note. * src/dispnew.c (init_faces_initial): new function. (init_display_interactive): rename from init_display; use will_dump_p instead of !initialized. Initialize faces early for pdumper if needed. (init_display): new function. (syms_of_display_for_pdumper): new function. (syms_of_display): call it. * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset on pdumper load. * src/data.c (Fdefalias): Use will_dump_p instead of Vpurify_flag. (Fmake_variable_buffer_local): silence compiler warning with -Og by making valcontents UNINIT. (arith_driver): silence compiler warning with UNINIT. * src/conf_post.h (ATTRIBUTE_SECTION): new macro. * src/composite.c (composition_gstring_put_cache): rehash hash table if needed. * src/coding.c (init_coding_once, syms_of_coding): remember pdumper stuff. * src/charset.h (charset_table_size, charset_table_user): declare. * src/charset.c (charset_table_used, charset_table_size): un-static. (init_charset_oncem, syms_of_charset): remember pdumper stuff. * src/category.c (category_table_version): remove obsolete variable. * src/callint.c (syms_of_callint): staticpro 'preserved_fns' (init_callproc): use will_dump_p instead of !CANNOT_DUMP. * src/bytecode.c (exec_byte_code): rehash table tables if needed * src/buffer.c (alloc_buffer_text, free_buffer_text): account for pdumper (init_buffer_once): add TODO; remember stuff for pdumper. (init_buffer): don't take initialized argument; adjust for pdumper. * src/atimer.c (init_atimer): initialize subr only if !initialized. * src/alloc.c: (vector_marked_p, set_vector_marked) (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p) (set_cons_marked, string_marked_p, set_string_marked) (symbol_marked_p, set_symbol_marked, interval_marked_p) (set_interval_marked): new accessor routines. Use them instead of raw GC access throughout. (Vdead): make non-static when ENABLE_CHECKING. (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike header as input instead of a vector. (number_finalizers_run): new internal C variable. (mark_maybe_object): check for pdumper objects. (valid_pointer_p): don't be gratuitously inefficient under rr(1). (make_pure_c_string): add support for size_byte = -2 mode indicating that string data points into Emacs image rodata. (visit_vectorlike_root): visits GC roots embedded in vectorlike objects. (visit_buffer_root): visits GC roots embedded in our totally-not-a-buffer buffer global objects. (visit_static_gc_roots): visit GC roots in the Emacs data section. (mark_object_root_visitor): root callback used for conventional GC marking (weak_hash_tables): new internal variable for tracking found weak hash tables during GC. (mark_and_sweep_weak_table_contents): new weak hash table marking. (garbage_collect_1): use new GC root visitor machinery. (mark_vectorlike): accept a vectorlike_header instead of a Lisp_Vector. (mark_frame, mark_window, mark_hash_table): new functions. (mark_object): initialize 'm'; check for pdumper objects and use new mark-bit accessors throughout. Remove some object-specific marking code and move to helper functions above. (survives_gc_p): check for pdumper objects. (gc-sweep): clear pdumper mark bits. (init_alloc_once_for_pdumper): new helper function for early init called both during normal init and pdumper load. (init_alloc_once): pdumper integration. * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o; invoke temacs with --temacs command line option; build dmpstruct.h from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper intermediate files during build. * nextstep/Makefile.in: build emacs.pdmp into NS packages * lisp/startup.el: account for new '--temacs' and '--dump-file' command line option. * lisp/loadup.el: rewrite early init to account for pdumper; use injected 'dump-mode' variable (set via the new '--temacs' option) instead of parsing command line. * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag', since the new 'dump-mode' * lib-src/make-fingerprint.c: new program * lib-src/Makefile.in: built make-fingerprint utility program * configure.ac: Add --with-pdumper toggle to control pdumper support; add --with-unexec toggle to control unexec support. Add --with-dumping option to control which dumping strategy we use by default. Adjust for pdumper throughout. Check for posix_madvise. * Makefile.in: Add @DUMPING@ substitution; add pdumper mode. * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c, dmpstruct.h, and pdumper dump files.
* Merge from origin/emacs-26Paul Eggert2018-12-31
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Pacify -Wcast-function-type warnings in GCC 8.1Andy Moreton2018-08-17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c: Move attributes into DEF_DLL_FN call. * src/dynlib.c (dynlib_addr): Use get_proc_addr. * src/w32.h: (get_proc_addr): New function. (LOAD_DLL_FN): Use it. (DEF_DLL_FN): Allow function attributes after argument list. Add function pointer type used by LOAD_DLL_FN. * src/w32.c (open_process_token, get_token_information) (lookup_account_sid, get_sid_sub_authority) (get_sid_sub_authority_count, get_security_info) (get_file_security, set_file_security) (set_named_security_info) (get_security_descriptor_owner, get_security_descriptor_group) (get_security_descriptor_dacl, is_valid_sid, equal_sid) (get_length_sid, copy_sid, get_native_system_info) (get_system_times, create_symbolic_link) (is_valid_security_descriptor, convert_sd_to_sddl) (convert_sddl_to_sd, get_adapters_info, reg_open_key_ex_w) (reg_query_value_ex_w, expand_environment_strings_w) (init_environment, create_toolhelp32_snapshot) (process32_first, process32_next, open_thread_token) (impersonate_self, revert_to_self, get_process_memory_info) (get_process_working_set_size, global_memory_status) (global_memory_status_ex, init_winsock) (maybe_load_unicows_dll, globals_of_w32): Use get_proc_addr. * src/w32fns.c (setup_w32_kbdhook, Ffile_system_info) (get_dll_version, w32_reset_stack_overflow_guard) (w32_backtrace, globals_of_w32fns): Use get_proc_addr. * src/w32font.c (get_outline_metrics_w, get_text_metrics_w) (get_glyph_outline_w, get_char_width_32_w): Use get_proc_addr. * src/w32heap.c (init_heap): Use get_proc_addr. * src/w32menu.c (globals_of_w32menu): Use get_proc_addr. * src/w32proc.c (init_timers, sys_kill, w32_compare_strings): Use get_proc_addr. * src/w32uniscribe.c (syms_of_w32uniscribe): Use get_proc_addr.
* Enlarge DUMPED_HEAP_SIZE for 64-bit Windows buildsEli Zaretskii2018-06-09
| | | | | * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 23MB. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* * src/w32heap.c (DUMPED_HEAP_SIZE) [_WIN64]: Bump to 22 MiB.Noam Postavsky2017-11-27
|
* Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-09-29
| | | | | This catches some URLs I missed in my previous scan, or perhaps were added after the scan.
* In w32heap.c bump up DUMPED_HEAP_SIZEMartin Rudalics2017-09-15
| | | | | * src/w32heap.c (DUMPED_HEAP_SIZE): Bump up DUMPED_HEAP_SIZE to 13*1024*1024 for 32-bit non-wide-integer builds.
* Fix compilation warnings in MinGW64 build using GCC 7Eli Zaretskii2017-09-09
| | | | | | | | | | | | | | | | | | | | | | | Reported by Richard Copley <rcopley@gmail.com>. * src/w32heap.c (init_heap): Declare enable_lfh only for mingw.org's MinGW build. * src/w32console.c (w32con_write_glyphs): * src/unexw32.c (get_section_info, COPY_CHUNK, unexec): Fix some mismatches of data type vs format spec. * src/w32fns.c (compute_tip_xy): * src/w32proc.c (stop_timer_thread): * src/w32notify.c (remove_watch): * src/eval.c (internal_lisp_condition_case): * src/editfns.c (Ftranslate_region_internal): * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned) (cons_to_signed): * src/buffer.c (fix_overlays_before): Initialize variables to avoid compiler warnings. * lib-src/etags.c (TeX_commands, process_file_name): Initialize variables to avoid compilation warnings.
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | Implement getrlimit and setrlimit for MS-WindowsEli Zaretskii2016-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * src/w32heap.c (getrlimit, setrlimit): New functions. Include w32.h. * src/emacs.c (main): Use 'rlim_t', not 'long', for values that should be compatible with 'struct rlimit' members. * nt/inc/sys/resource.h: New header file. * nt/mingw-cfg.site (ac_cv_func_getrlimit, ac_cv_func_setrlimit): Set to "yes".
* | Enlarge DUMPED_HEAP_SIZEEli Zaretskii2016-11-05
| | | | | | | | | | * src/w32heap.c (DUMPED_HEAP_SIZE) [_WIN64 || WIDE_EMACS_INT]: Enlarge to 21MB. Reported by Richard Copley <rcopley@gmail.com>.
* | Merge from origin/emacs-25Paul Eggert2016-10-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 50fa7d6 ;* src/w32heap.c: Fix typo and wording of the comments. 6f1325e electric-quote mode no longer worries about coding c2a1792 * src/regex.c (re_search_2): Make new code safe for -Wjump-mi... f6134bb Port to GCC 6.2.1 + --enable-gcc-warnings b2ba630 Explain how to debug emacsclient lisp errors 9da53e2 Let describe-function work for lambda again 5c2da93 Fix kill-line's docstring ad66b3f Fix handling of allocation in regex matching 5a26c9b * lisp/electric.el (electric-quote-mode): Improve doc (Bug#24... 3877c91 vc-region-history: Search just on lines intersecting the region 8988327 Fix documentation of 'alist-get' b6998ea * src/regex.h (re_match_object): Improve commentary. # Conflicts: # etc/NEWS # lisp/help-fns.el
| * ;* src/w32heap.c: Fix typo and wording of the comments.Eli Zaretskii2016-10-23
| |
* | Fix compiler warnings in the MinGW buildEli Zaretskii2016-05-21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac [mingw32]: Don't add -Wpointer-sign, and add -Wno-pointer-sign, to keep the noise level down. * nt/mingw-cfg.site (gl_cv_warn_c__Wredundant_decls): Disable -Wredundant-decls, as that produces a lot of noise due to redeclaration of time-related functions by gnulib. * nt/runemacs.c (set_user_model_id): Fix argument type of 'SetCurrentProcessExplicitAppUserModelID'. * src/image.c (x_create_bitmap_from_file) [HAVE_NTGUI]: Don't declare 'dpyinfo', as it is unused. (xpm_load): Fix warnings about pointer signedness. * src/w32proc.c (IsValidLocale, init_winsock): Remove redundant prototypes. (sys_spawnve): Avoid warnings about discarding 'const' qualifier. (sys_select): Provide prototype. (g_b_init_compare_string_w): Move declaration to file scope. * src/w32heap.c (dumped_data_commit): Now static. (FREEABLE_P): Avoid warnings about pointer comparison with integer. (mmap_realloc): Cast to 'char *' for arithmetics on void pointers. * src/w32console.c (ctrl_c_handler, sys_tputs, sys_tgetstr) (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear): Provide prototypes. * src/w32.c (globals_of_w32, conv_sockaddr_to_lisp): Remove redundant prototypes. (w32_get_internal_run_time, map_w32_filename): Provide prototype. (init_environment, sys_ctime): Avoid warnings about discarding 'const' qualifier. Include utimens.h. (sys_ctime, sys_chdir, sys_creat, sys_fopen, sys_mkdir) (sys_open, sys_rename, sys_rmdir, is_slow_fs, term_winsock) (sys_close, sys_dup2, sys_read, sys_write, sys_localtime): Provide prototypes. (sys_rename_replace): Use %d to avoid compiler warnings. (_wsa_errlist): Make the message text 'const char *', to avoid compilation warnings. (dynlib_reset_last_error): Move prototype to file scope. (w32_get_resource): First argument is now 'const char *'. * src/w32uniscribe.c (syms_of_w32uniscribe): Provide prototype. (otf_features): Second argument is no 'const char *'. * src/w32term.c (free_frame_menubar, x_wm_set_size_hint) (x_set_window_size): Remove redundant prototypes. (XChangeGC, XGetGCValues, w32_draw_underwave) (w32_draw_rectangle, w32_shift_glyphs_for_insert, x_mouse_leave) (x_calc_absolute_position, x_destroy_window): Now static. (menubar_selection_callback): Move prototype to file scope. * src/w32font.c (g_b_init_get_glyph_outline_w): Remove redundant declaration. (w32_to_x_charset): Fix warnings about discarding 'const' qualifier. (w32font_full_name): Fix warnings about implicit conversion of 'float' to 'double'. * src/w32reg.c (w32_get_rdb_resource): Fix warnings about discarding 'const' qualifier. * src/w32menu.c (syms_of_w32menu, globals_of_w32menu) (set_frame_menubar): Remove redundant prototypes. (menubar_selection_callback, w32_menu_display_help): Provide prototypes. (simple_dialog_show): Avoid warnings about discarding 'const' qualifier. * src/w32fns.c (syms_of_w32fns, globals_of_w32fns) (free_frame_menubar, w32_strerror, x_set_menu_bar_lines) (x_set_tool_bar_lines, x_set_internal_border_width): Remove redundant prototypes. (current_popup_menu): Remove redundant declaration. (colormap_t): Member 'name' is now 'const char *'. (add_system_logical_colors_to_map): Fix signed/unsigned warnings. (x_decode_color, x_set_border_pixel) (x_clear_under_internal_border, x_set_name, hook_w32_key) (reset_w32_kbdhook_state, deliver_wm_chars, w32_backtrace): Now static. (w32_load_cursor, w32_key_to_modifier, map_keypad_keys) (w32_msg_worker, w32_last_error): Provide prototypes. (funhook, lookup_vk_code): Avoid warnings about missing parentheses. (x_default_font_parameter, Fw32_notification_notify): Avoid warnings about discarding 'const' qualifier. (Fx_create_frame): Avoid warnings about empty body of 'else'. (x_screen_planes): Ifdef away unused function. (Fx_show_tip): Remove unused variables. (Fw32_battery_status): Avoid warnings about implicit promotion from float to double. (Fw32_notification_notify): Initialize 'timeout'. * src/profiler.c (profiler_cpu_running) [HAVE_ITIMERSPEC]: Only define the TIMER_SETTIME_RUNNING value if it will be used. * src/w32notify.c (send_notifications): Ifdef away an empty if clause. Remove unused variable. (watch_end, watch_completion): Provide prototypes. * src/sound.c (sound_warning) [WINDOWSNT]: Don't define: unused. * src/callproc.c (child_setup, getenv_internal_1) [WINDOWSNT]: Fix warning with pointer signedness. * src/gnutls.c (gnutls_x509_crt_get_signature) (gnutls_alert_send_appropriate) [WINDOWSNT]: Don't define, and don't load them from the GnuTLS library, as they are no longer used. * src/process.c (DATAGRAM_CHAN_P) [!DATAGRAM_SOCKETS]: Don't define, as it's unused. * src/unexw32.c (open_input_file, open_output_file) (close_file_data): Remove redundant prototypes. (_start): provide prototype. (mainCRTStartup): Move prototype to file level. (find_section): Use type-cast to shut up compiler warnings. (offset_to_section, relocate_offset): Now static. (find_section): First argument is now a 'const char *'. (offset_to_section): Ifdef away, as it's unused. * src/w32heap.h (find_section): Adjust prototype. * src/dynlib.c (dynlib_reset_last_error): Provide prototype. * src/dired.c (directory_files_internal_w32_unwind): Avoid warnings about missing prototypes. (is_slow_fs) [WINDOWSNT]: Provide prototype at file level. (directory_files_internal) [WINDOWSNT]: Fix warnings about pointer signedness. * src/fileio.c (Ffile_writable_p, Ffile_regular_p) [WINDOWSNT]: Fix warnings about pointer signedness. * src/filelock.c (WTMP_FILE) [WINDOWSNT]: Don't define, it's unused. * src/sysdep.c (_getpid): Remove redundant prototype. (sys_subshell) [DOS_NT]: Don't define 'status', it's unused. [!MSDOS]: Don't define 'st', it's unused. (init_sys_modes) [DOS_NT]: Don't define 'terminal', it's unused. (str_collate) [WINDOWSNT]: Avoid warnings about pointer signedness. * src/keyboard.c (tty_read_avail_input) [WINDOWSNT]: Don't define n_to_read, as it is not used. (MAX_ENCODED_BYTES) [WINDOWSNT]: Don't define, as it's unused. * src/w32font.h (syms_of_w32font): Remove redundant prototype. * src/xfaces.c (x_display_info) [HAVE_NTGUI]: Remove unused macro. * src/term.c (init_tty) [DOS_NT]: Ifdef away variables that are not used by DOS_NT builds, to avoid compiler warnings. * src/menu.c (current_popup_menu) [HAVE_NTGUI]: Remove redundant declaration. * src/dispnew.c (init_display) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * src/w32term.h (x_set_window_size, x_get_focus_frame) (x_make_frame_visible, x_make_frame_invisible, x_iconify_frame) (x_set_frame_alpha, x_activate_menubar, x_bitmap_icon) (x_free_frame_resources, x_real_positions) (display_x_get_resource): Remove redundant prototypes. * lib-src/ntlib.c (sys_ctime, sys_fopen, sys_chdir, mkostemp) (sys_rename, gettimeofday): Provide prototypes. * lib-src/ntlib.h (getuid, geteuid, mkostemp): Remove redundant declarations. * lib-src/emacsclient.c (w32_getenv): Argument is now 'const char *'. (xstrdup, w32_get_resource, w32_window_app, w32_execvp, ttyname) (close_winsock, initialize_sockets, w32_set_user_model_id) (w32_find_emacs_process, w32_give_focus) [WINDOWSNT]: Add prototypes. (w32_get_resource) [WINDOWSNT]: Fix a warning about signedness difference. (w32_set_user_model_id): Update prototype of SetCurrentProcessExplicitAppUserModelID to avoid compiler warnings. (start_daemon_and_retry_set_socket) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * lib-src/etags.c (MAXPATHLEN) [WINDOWSNT]: Remove unused macro.
* Fix w32 memory-management problem when extending buffer textEli Zaretskii2016-04-15
| | | | | | | | | | | | | | * src/w32heap.c (mmap_realloc): Only attempt extending a region if the following region has the same allocation base. Also, use the original allocation base and enlarged size to commit reserved memory, to ensure that the allocation base stays at its original value. This fixes several hard-to-debug problems whereby part of buffer text was overwritten with binary nulls, because mmap_realloc copied only part of buffer text when extending it. See http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00325.html and http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23223#55 for two examples of the related problems.
* Rework C source files to avoid ^(Paul Eggert2016-03-10
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Fix memory reservation on MS-WindowsEli Zaretskii2016-02-20
| | | | | | | * src/w32heap.c (mmap_alloc): Reserve memory in 64KB granular units. This avoids leaving gaps in reserved memory regions that no one can use, since memory reservation must produce 64KB-aligned addresses. (Bug#22526)
* Make 'mmap_realloc' on MS-Windows more reliableEli Zaretskii2016-02-14
| | | | | | | | | | | | * src/w32heap.c (mmap_alloc): If reserving memory succeeds, but committing fails, return NULL. Don't call GetLastError twice for the same API error. (mmap_realloc): Zero out MEMORY_BASIC_INFORMATION structures before calling VirtualQuery, to avoid using garbled values if the call fails. If committing more pages from the same block fails, fall back on mmap_alloc + CopyMemory. Enhance debugging printouts if the call to VirtualAlloc to commit more pages fails. (Bug#22526)
* Expunge "allow" + infinitive without direct object from source and doc.Alan Mackenzie2016-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do the same for "permit", "enable", and "prevent". * doc/emacs/mule.texi: * doc/lispref/control.texi: * doc/lispref/display.texi: * doc/lispref/frames.texi: * doc/lispref/functions.texi: * doc/lispref/nonascii.texi: * doc/lispref/streams.texi: * doc/lispref/windows.texi: * doc/misc/dbus.texi: * doc/misc/eww.texi: * doc/misc/flymake.texi: * doc/misc/octave-mode.texi: * doc/misc/org.texi: * doc/misc/reftex.texi: * doc/misc/tramp.texi: * doc/misc/wisent.texi: * etc/NEWS: * lisp/autorevert.el: * lisp/cedet/mode-local.el: * lisp/cedet/semantic/senator.el: * lisp/cedet/semantic/wisent.el: * lisp/dos-fns.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/mm-util.el: * lisp/international/characters.el: * lisp/ldefs-boot.el: * lisp/mail/mailclient.el: * lisp/man.el: * lisp/mh-e/mh-search.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-gvfs.el: * lisp/org/org-crypt.el: * lisp/org/org-element.el: * lisp/org/org-feed.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-icalendar.el: * lisp/org/ox-publish.el: * lisp/org/ox.el: * lisp/play/gamegrid.el: * lisp/play/gomoku.el: * lisp/progmodes/antlr-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/vhdl-mode.el: * lisp/strokes.el: * lisp/textmodes/ispell.el: * lisp/tree-widget.el: * lisp/vc/pcvs.el: * lisp/window.el: * src/lisp.h: * src/w32.c: * src/w32heap.c: * src/w32term.c: * src/window.c: * src/xfaces.c: Replace solecisms like "This allow to do something" with a correct alternative, such as "This allow you to do something", "This allows something to be done" or "This allows the doing of something".
* Ensure 8-byte aligned memory allocation on MS-Windows 9XJussi Lahdenniemi2016-01-16
| | | | | | | | | | | | | | * src/w32heap.c (init_heap): Redirect malloc, realloc, and free to special functions on Windows 9X. Refuse to dump Emacs on Windows 9X. (malloc_after_dump_9x, realloc_after_dump_9x) (free_after_dump_9x): New functions. (Bug#22379) See also http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html for more details about the original problem. * nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x) (free_after_dump_9x): Add prototypes. Copyright-paperwork-exempt: yes
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Include file cleanup for w32 files in src directoryEli Zaretskii2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32xfns.c: Don't include keyboard.h, window.h, charset.h, fontset.h, blockinput.h. * src/w32uniscribe.c: Don't include dispextern.h, character.h, charset.h, fontset.h. * src/w32term.c: Don't include systty.h, systime.h, charset.h, character.h, ccl.h, dispextern.h, disptab.h, intervals.h, process.h, atimer.h, keymap.h, w32heap.h. Include bitmap/gray.xbm in an ifdef-ed away block. Include fcntl.h for CYGWIN. (set_frame_param): Remove unused function. * src/w32select.c: Don't include charset.h and composite.h. (setup_config, Fw32_get_clipboard_data): Avoid compiler warnings due to pointer signedness mismatches. * src/w32reg.c (w32_get_string_resource): Avoid compiler warnings due to pointer signedness mismatches. * src/w32proc.c: Include unistd.h. Don't include systime.h, process.h, dispextern.h. (sys_spawnve, Fw32_short_file_name, Fw32_long_file_name) (Fw32_application_type): Avoid compiler warnings due to pointer signedness mismatches. * src/w32menu.c: Don't include keymap.h, termhooks.h, window.h, character.h, charset.h, dispextern.h. (simple_dialog_show, add_menu_item): Avoid compiler warnings due to pointer signedness mismatches. * src/w32inevt.c: Don't include dispextern.h, window.h, termhooks.h, w32heap.h. * src/w32font.c: Don't include dispextern.h, character.h, charset.h, fontset.h, font.h. (intern_font_name, add_font_entity_to_list) (registry_to_w32_charset, w32_to_x_charset, fill_in_logfont) (list_all_matching_fonts): Avoid compiler warnings due to pointer signedness mismatches. * src/w32fns.c: Don't include character.h, intervals.h, dispextern.h, epaths.h, charset.h, ccl.h, fontset.h, systime.h, termhooks.h, w32heap.h, bitmap/gray.xbm, font.h, w32font.h. (w32_color_map_lookup, add_system_logical_colors_to_map) (x_decode_color, x_set_name, FPRINTF_WM_CHARS, Fxw_color_defined_p) (Fxw_color_values, x_display_info_for_name, Fset_message_beep) (x_create_tip_frame, Fx_file_dialog, Fsystem_move_file_to_trash) (w32_parse_hot_key, Ffile_system_info, w32_kbd_patch_key): Avoid compiler warnings, mainly due to pointer signedness mismatches. (unwind_create_frame_1): Remove unused function. * src/w32console.c: Don't include character.h, disptab.h, frame.h, window.h, termhooks.h, dispextern.h. (w32con_write_glyphs, w32con_write_glyphs_with_face): Fix pointer signedness mismatch. * src/w32.c: Include c-strcase.h and systty.h. Don't include w32heap.h.
* Handle NULL pointers in w32heap.c allocation routinesEli Zaretskii2015-07-27
| | | | | | | | * src/w32heap.c (FREEABLE_P): Consider a NULL pointer "not freeable". (realloc_after_dump, realloc_before_dump, free_before_dump): Handle NULL pointers gracefully, as Emacs now seems to expect that.
* * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 20MB.Andy Moreton2015-07-10
| | | | Copyright-paperwork-exempt: yes
* In w32heap.c bump DUMPED_HEAP_SIZE to 19/12 MBMartin Rudalics2015-05-19
| | | | * emacs-git/quick/src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 19/12 MB.
* Merge from origin/emacs-24Fabián Ezequiel Gallina2015-01-28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a012c7b Fix copyright years by hand 732fd4c Update copyright year to 2015 Conflicts: INSTALL.REPO admin/notes/lel-TODO doc/man/grep-changelog.1 doc/misc/eww.texi etc/CONTRIBUTE etc/GNU etc/NEWS etc/refcards/emacsver.tex etc/refcards/ru-refcard.tex lib-src/grep-changelog lib-src/test-distrib.c lib/alloca.in.h lib/binary-io.h lib/c-ctype.h lib/c-strcasecmp.c lib/c-strncasecmp.c lib/careadlinkat.c lib/close-stream.c lib/dosname.h lib/dup2.c lib/filemode.h lib/fpending.c lib/fpending.h lib/getgroups.c lib/getloadavg.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/gettext.h lib/gettime.c lib/gettimeofday.c lib/group-member.c lib/md5.c lib/md5.h lib/memrchr.c lib/sha1.c lib/sig2str.c lib/stdarg.in.h lib/stdbool.in.h lib/stdlib.in.h lib/strftime.c lib/strtoimax.c lib/strtol.c lib/strtoll.c lib/strtoull.c lib/tempname.c lib/time_r.c lib/unsetenv.c lib/xalloc-oversized.h lisp/gnus/gnus-setup.el lisp/progmodes/cap-words.el lisp/w32-common-fns.el m4/alloca.m4 m4/dup2.m4 m4/filemode.m4 m4/getgroups.m4 m4/getloadavg.m4 m4/gettime.m4 m4/gettimeofday.m4 m4/gnulib-common.m4 m4/group-member.m4 m4/manywarnings.m4 m4/memrchr.m4 m4/mktime.m4 m4/pathmax.m4 m4/pthread_sigmask.m4 m4/sig2str.m4 m4/ssize_t.m4 m4/st_dm_mode.m4 m4/stat-time.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdio_h.m4 m4/strftime.m4 m4/strtoimax.m4 m4/strtoll.m4 m4/strtoull.m4 m4/strtoumax.m4 m4/time_h.m4 m4/timer_time.m4 m4/timespec.m4 m4/unistd_h.m4 m4/utimbuf.m4 nextstep/README nt/addsection.c src/insdel.c src/w32heap.c test/automated/package-x-test.el
| * Update copyright year to 2015Paul Eggert2015-01-01
| | | | | | | | Run admin/update-copyright.
| * Fix bug #18995 with compiling w32heap.c with -funroll-loops.Eli Zaretskii2014-11-09
| | | | | | | | src/w32heap.c (allocate_heap): Set the lower limit of heap at 8MB.
* | Fix problems with 32-bit wide-int build exposed by MinGWEli Zaretskii2015-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lisp.h (XPNTR): Move definition to after XTYPE, to avoid compilation error in an unoptimized build when !USE_LSB_TAG. src/w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the same larger value as for the 64-bit build. src/w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to avoid compiler warnings. src/w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout): Avoid compiler warnings about cast from integer to pointer of different size. src/w32menu.c (menubar_selection_callback, w32_menu_show): Cast to UINT_PTR instead of EMACS_INT, to avoid compiler warnings about casting from integer to pointer of different size. (add_menu_item): Pass the help-echo string as a pointer to Lisp_String, not as a Lisp_Object. (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp string object from its C pointer. src/w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its C pointer. <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer. (Fx_create_frame): Type-cast the result of XFASTINT to avoild compiler warnings about size differences. (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a pointer to a Lisp_Cons struct, not as a disguised EMACS_INT. (Fw32_toggle_lock_key): Pass the new state of the key as a C integer; use -1 for nil. Doc fix. src/.gdbinit (xgetsym): New subroutine. (xsymname, xsymbol): Use it. (xprintsym): No need to call xgetptr.
* | Fix copyright years by handPaul Eggert2015-01-01
| | | | | | | | | | | | These are dates that admin/update-copyright did not update, or updated incorrectly. Also, back out the copyright-date change to doc/misc/texinfo.tex, as upstream hasn't updated that date yet.
* | Replace uses of _W64 with MINGW_W64Oscar Fuentes2014-11-27
| | | | | | | | | | | | | | | | | | This is the `master' branch follow-up to the change made previously on the emacs-24 branch (81e0cca7bbc99dbfda898a8aaab740ae121cf045). * src/w32.c: Use MINGW_W64 instead of _W64. * src/w32heap.c: Likewise.
* | src/w32heap.c: Minor formatting and whitespace changes.Eli Zaretskii2014-06-27
| |
* | Fix last commit.Eli Zaretskii2014-06-04
| |