1. 01 Feb, 2019 1 commit
    • Paul Eggert's avatar
      Rename CANNOT_DUMP to HAVE_UNEXEC · 3b69e02a
      Paul Eggert authored
      * 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.
      3b69e02a
  2. 01 Jan, 2019 1 commit
  3. 01 Jan, 2018 1 commit
  4. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  5. 01 Jan, 2017 1 commit
  6. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      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.
      7352c6c6
  7. 01 Jan, 2016 1 commit
  8. 01 Jan, 2015 2 commits
  9. 20 Dec, 2014 1 commit
    • Paul Eggert's avatar
      Simplify unexec file mode setting · 9b14d8b6
      Paul Eggert authored
      * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
      Don't include <sys/stat.h> when no longer needed.
      (unexec): Create file with correct mode in the first place,
      rather than overwriting the mode later and fiddling with the
      global umask in the mean time.  Avoid bogus usage like
      'umask (777)', which should have been 'umask (0777)'.
      (mark_x): Remove. All callers removed.
      9b14d8b6
  10. 16 Apr, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix the MSDOS build. · bf6b4923
      Eli Zaretskii authored
       src/unexcoff.c [MSDOS]: Include libc/atexit.h.
       (copy_text_and_data): Zero out the atexit chain pointer before
       dumping Emacs.
       src/termhooks.h (encode_terminal_code): Update prototype.
       src/term.c (encode_terminal_code) [DOS_NT]: Make it externally
       visible for all DOS_NT ports, not just WINDOWSNT.
       (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
       src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
       unless it is defined.
       (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
       src/process.c (close_on_exec, accept4, process_socket): Move into
       the "ifdef subprocesses" part.
       (catch_child_signal): Condition by "ifdef subprocesses".
       (syms_of_process) <Qinternal_default_process_sentinel>
       <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
       src/msdos.h: Add prototypes for new functions.
       (EINPROGRESS): Define.
       (O_CLOEXEC): Define to zero.
       src/msdos.c (check_window_system): Remove unnecessary an
       incompatible duplicate function.
       (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
       functions in support of new functionality.
       src/menu.c (single_menu_item): Add visual indication  of submenu
       also for menus on MSDOS frames.
       (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
       src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
       when async subprocesses aren't supported.
       src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
       src/emacs.c (close_output_streams): Zero out errno before calling
       close_stream.
       src/dired.c [MSDOS]: Include msdos.h.
       src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
       (DATA_START) [MSDOS]: Define.
       (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
       src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
       Ifdef away for MSDOS.
       (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
       (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
       for MSDOS.
       (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
       Use temporary file template that is compatible with mkostemp.
       Move vfork-related portions under #ifndef MSDOS.
       (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
      
       lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
       doc strings, as required by snarf-documentation.
      
       msdos/sedlisp.inp:
       msdos/sedlibmk.inp:
       msdos/sedleim.inp:
       msdos/sed3v2.inp:
       msdos/sed2v2.inp:
       msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4.
       msdos/inttypes.h: Add PRIdMAX.
       msdos/INSTALL: Update for Emacs 24.4.
       msdos/sedadmin.inp: New file.
      bf6b4923
  11. 05 Apr, 2014 1 commit
    • Paul Eggert's avatar
      Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'. · faa52174
      Paul Eggert authored
      * alloc.c (memory_full):
      * charset.c (syms_of_charset):
      * doc.c (Fsnarf_documentation):
      * emacs.c (main):
      * font.c (BUILD_STYLE_TABLE):
      * keyboard.c (make_lispy_event):
      * profiler.c (setup_cpu_timer):
      * xgselect.c (xg_select):
      * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
      Use ARRAYELTS.
      * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
      Replace the only use with ARRAYELTS (font_property_table).
      * xfaces.c (DIM): Remove.  All uses replaced by ARRAYELTS.
      faa52174
  12. 01 Jan, 2014 1 commit
  13. 16 Jul, 2013 2 commits
    • Paul Eggert's avatar
      * fileio.c (report_file_errno): Fix errno reporting bug. · a9757f6a
      Paul Eggert authored
      If the file name is neither null nor a pair, package it up as a
      singleton list.  All callers changed, both to this function and to
      report_file_error.  This fixes a bug where the memory allocator
      invoked by list1 set errno so that the immediately following
      report_file_error reported the wrong errno value.
      a9757f6a
    • Paul Eggert's avatar
      Prefer list1 (X) to Fcons (X, Qnil) when building lists. · 6c6f1994
      Paul Eggert authored
      This makes the code easier to read and the executable a bit smaller.
      Do not replace all calls to Fcons that happen to create lists,
      just calls that are intended to create lists.  For example, when
      creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
      rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
      Similarly for list2 through list5.
      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
      * bytecode.c (exec_byte_code):
      * callint.c (quotify_arg, Fcall_interactively):
      * callproc.c (Fcall_process, create_temp_file):
      * charset.c (load_charset_map_from_file)
      (Fdefine_charset_internal, init_charset):
      * coding.c (get_translation_table, detect_coding_system)
      (Fcheck_coding_systems_region)
      (Fset_terminal_coding_system_internal)
      (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
      * composite.c (update_compositions, Ffind_composition_internal):
      * dired.c (directory_files_internal, file_name_completion)
      (Fsystem_users):
      * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
      * doc.c (Fsnarf_documentation):
      * editfns.c (Fmessage_box):
      * emacs.c (main):
      * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
      (Feval, eval_sub, Ffuncall, apply_lambda):
      * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
      (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
      (Fset_file_times, Finsert_file_contents)
      (Fchoose_write_coding_system, Fwrite_region):
      * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
      * font.c (font_registry_charsets, font_parse_fcname)
      (font_prepare_cache, font_update_drivers, Flist_fonts):
      * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
      * frame.c (make_frame, Fmake_terminal_frame)
      (x_set_frame_parameters, x_report_frame_params)
      (x_default_parameter, Fx_parse_geometry):
      * ftfont.c (syms_of_ftfont):
      * image.c (gif_load):
      * keyboard.c (command_loop_1):
      * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
      (Fcopy_keymap, append_key, Fcurrent_active_maps)
      (Fminor_mode_key_binding, accessible_keymaps_1)
      (Faccessible_keymaps, Fwhere_is_internal):
      * lread.c (read_emacs_mule_char):
      * menu.c (find_and_return_menu_selection):
      * minibuf.c (get_minibuffer):
      * nsfns.m (Fns_perform_service):
      * nsfont.m (ns_script_to_charset):
      * nsmenu.m (ns_popup_dialog):
      * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
      (Fx_own_selection_internal):
      * nsterm.m (append2):
      * print.c (Fredirect_debugging_output)
      (print_prune_string_charset):
      * process.c (Fdelete_process, Fprocess_contact)
      (Fformat_network_address, set_socket_option)
      (read_and_dispose_of_process_output, write_queue_push)
      (send_process, exec_sentinel):
      * sound.c (Fplay_sound_internal):
      * textprop.c (validate_plist, add_properties)
      (Fput_text_property, Fadd_face_text_property)
      (copy_text_properties, text_property_list, syms_of_textprop):
      * unexaix.c (report_error):
      * unexcoff.c (report_error):
      * unexsol.c (unexec):
      * xdisp.c (redisplay_tool_bar, store_mode_line_string)
      (Fformat_mode_line, syms_of_xdisp):
      * xfaces.c (set_font_frame_param)
      (Finternal_lisp_face_attribute_values)
      (Finternal_merge_in_global_face, syms_of_xfaces):
      * xfns.c (x_default_scroll_bar_color_parameter)
      (x_default_font_parameter, x_create_tip_frame):
      * xfont.c (xfont_supported_scripts):
      * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
      (menu_help_callback, xmenu_show):
      * xml.c (make_dom):
      * xterm.c (set_wm_state):
      Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
      and similarly for list2 through list5.
      6c6f1994
  14. 12 Jul, 2013 2 commits
    • Paul Eggert's avatar
      Clean up errno reporting and fix some errno-reporting bugs. · a773ed9a
      Paul Eggert authored
      * callproc.c (Fcall_process):
      * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
      * process.c (create_process, Fmake_network_process):
      * unexaix.c (report_error):
      * unexcoff.c (report_error):
      Be more careful about reporting the errno of failed operations.
      The code previously reported the wrong errno sometimes.
      Also, prefer report_file_errno to setting errno + report_file_error.
      (Fcall_process): Look at openp return value rather than at path,
      as that's a bit faster and clearer when there's a numeric predicate.
      * fileio.c (report_file_errno): New function, with most of the
      old contents of report_file_error.
      (report_file_error): Use it.
      (Ffile_exists_p, Ffile_accessible_directory_p):
      Set errno to 0 when it is junk.
      * fileio.c (Faccess_file):
      * image.c (x_create_bitmap_from_file):
      Use faccessat rather than opening the file, to avoid the hassle of
      having a file descriptor open.
      * lisp.h (report_file_errno): New decl.
      * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
      a773ed9a
    • Paul Eggert's avatar
      Fix races with threads and file descriptors. · bacba3c2
      Paul Eggert authored
      * configure.ac (PTY_TTY_NAME_SPRINTF): Use emacs_close, not close.
      * src/callproc.c (Fcall_process_region):
      * src/dired.c (open_directory):
      * src/emacs.c (main, Fdaemon_initialized):
      * src/image.c (x_find_image_file):
      * src/inotify.c (Finotify_rm_watch):
      * src/lread.c (Flocate_file_internal):
      * src/process.c (Fnetwork_interface_list, Fnetwork_interface_info):
      * src/term.c (term_mouse_moveto, init_tty):
      * src/termcap.c (tgetent):
      * src/unexaix.c, src/unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
      * src/unexaix.c, src/unexcoff.c, src/unexcw.c, src/unexelf.c (unexec):
      * src/unexhp9k800.c, src/unexmacosx.c (unexec):
      * src/callproc.c (Fcall_process_region):
      Use emacs_close, not close.
      * src/sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
      New macro and function, which emulates the POSIX_CLOSE_RESTART macro
      and posix_close function on current platforms (which all lack them).
      (emacs_close): Use it.  This should fix the races on GNU/Linux and
      on AIX and on future platforms that support POSIX_CLOSE_RESTART,
      and it should avoid closing random victim file descriptors on
      other platforms.
      bacba3c2
  15. 06 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Use emacs_open more consistently when opening files. · 406af475
      Paul Eggert authored
      This handles EINTR more consistently now, and makes it easier
      to introduce other uniform changes to file descriptor handling.
      * src/systdio.h: New file.
      * src/buffer.c (mmap_init):
      * cygw32.c (chdir_to_default_directory):
      * dispnew.c (Fopen_termscript):
      * emacs.c (Fdaemon_initialized):
      * fileio.c (Fdo_auto_save):
      * image.c (slurp_file, png_load_body, jpeg_load_body):
      * keyboard.c (Fopen_dribble_file):
      * lread.c (Fload):
      * print.c (Fredirect_debugging_output):
      * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
      * termcap.c (tgetent):
      * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
      * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
      * w32term.c (w32_initialize) [CYGWIN]:
      * xfaces.c (Fx_load_color_file):
      Use emacs_open instead of plain open, and emacs_fopen instead of
      plain fopen.
      * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
      * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
      * callproc.c (default_output_mode): New constant.
      (Fcall_process): Use it to call emacs_open instead of plain creat.
      * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
      * sysdep.c (emacs_open): Add commentary and don't call file name "path".
      (emacs_fopen): New function.
      * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
      Include <lisp.h>, for emacs_open.
      * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
      406af475
  16. 25 Feb, 2013 1 commit
    • Paul Eggert's avatar
      Simplify data_start configuration. · 1ddc2bd6
      Paul Eggert authored
      This is a followon simplification to the fix for Bug#13650.
      * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
      not always needed.
      (HAVE_DATA_START): New macro.
      * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
      Remove legacy-systems section, as this stuff is no longer
      applicable with current linking strategies.
      * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
      (START_FILES): Remove.  All uses removed.
      (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
      (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
      (buildobj.h): Use it.
      ($(ALLOBJS)): Depend on globals.h.
      (temacs$(EXEEXT)): Use $(ALLOBJS).
      * src/autodeps.mk (ALLOBJS): Move to Makefile.in.
      * src/deps.mk (vm-limit.o):
      * src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
      Do not depend on mem-limits.h.
      * src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
      (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
      [__GNUC__ && !ORDINARY_LINK]: Remove.
      * src/mem-limits.h, src/pre-crt0.c: Remove.
      * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
      * src/unexcoff.c (etext): New decl.
      (make_hdr): Use it instead of start_of_data.
      * src/vm-limit.c: Move most of mem-limits.h's contents here.
      (data_start): New decl.  It's OK if this is approximate,
      so simplify-away some unnecessary exactness.
      (POINTER): Remove; all uses removed.
      (data_space_start): Now char *, to avoid casts.
      (exceeds_lisp_ptr): New function, replacing the old
      EXCEEDS_LISP_PTR macro.  All uses changed.
      (check_memory_limits): Simplify and remove casts.
      (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
      (memory_warnings): Use data_start instead of start_of_data.
      
      Fixes: debbugs:13783
      1ddc2bd6
  17. 01 Jan, 2013 1 commit
  18. 27 Nov, 2012 1 commit
    • Paul Eggert's avatar
      Assume POSIX 1003.1-1988 or later for errno.h. · 22626a85
      Paul Eggert authored
      * lib-src/movemail.c (main): Assume EAGAIN and EBUSY.
      * src/dired.c (directory_files_internal, file_name_completion):
      Assume EAGAIN and EINTR are defined.
      * src/fileio.c (Fcopy_file): Assume EISDIR is defined.
      * src/gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
      * src/gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
      * src/lread.c (readbyte_from_file): Assume EINTR is defined.
      * src/process.c (wait_reading_process_output, send_process) [subprocesses]:
      Assume EIO and EAGAIN are defined.
      * src/unexcoff.c (write_segment): Assume EFAULT is defined.
      
      Fixes: debbugs:12968
      22626a85
  19. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
  20. 19 Aug, 2012 1 commit
  21. 05 Jan, 2012 1 commit
  22. 17 Mar, 2011 2 commits
  23. 16 Mar, 2011 1 commit
    • Paul Eggert's avatar
      New file unexec.h, the (simple) interface for unexec. · ce701a33
      Paul Eggert authored
      * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
      (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
      Depend on unexec.h.
      * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
      * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
      * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
      ce701a33
  24. 25 Jan, 2011 1 commit
  25. 15 Jan, 2011 1 commit
  26. 15 Oct, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix the MSDOS build broken by latest revisions. · c3911ead
      Eli Zaretskii authored
       src/unexcoff.c (make_hdr): Fix prototype according to changes in
       2010-10-03T13:59:56Z!dann@ics.uci.edu.
       msdos/sed1v2.inp: Use $(..) instead of ${..} in all edit commands.
       Needed because of changes in 2010-10-10T14:43:05Z!dann@ics.uci.edu.
       msdos/sed6.inp (mkinfodir): Edit to avoid Unix shell-isms.  Needed
       because of changes in 2010-10-09T18:31:12Z!rgm@gnu.org.
      c3911ead
  27. 04 Oct, 2010 1 commit
  28. 03 Oct, 2010 1 commit
    • Dan Nicolaescu's avatar
      Remove unused arguments for unexec. · dd5ecd6b
      Dan Nicolaescu authored
      The third one is never used, and the last two are always passed as zero.
      * src/emacs.c (unexec): Add declaration.
      (Fdump_emacs): Only pass the first two arguments to unexec.
      Simplify #ifdef.
      * src/unexw32.c (unexec):
      * src/unexsol.c (unexec):
      * src/unexhp9k800.c (unexec):
      * src/unexcw.c (unexec): Remove the last 3 arguments, unused.
      * src/unexelf.c (unexec): Remove the last 3 arguments, unused.
      (find_section): Use const.
      * src/unexmacosx.c (unexec): Remove the last 3 arguments, unused.
      (unexec_error): Declare it NO_RETURN.
      * src/unexcoff.c (make_hdr): Assume bss_start is always zero, remove
      it as an argument, remove data_start and entry_address arguments, unused.
      (unexec): Remove bss_start, data_start and
      entry_address arguments.
      * src/unexaix.c (make_hdr): Assume bss_start is always zero, remove
      it as an argument, remove data_start and entry_address arguments, unused.
      (unexec): Remove bss_start, data_start and
      entry_address arguments.
      dd5ecd6b
  29. 22 Aug, 2010 1 commit
    • Eli Zaretskii's avatar
      Clean up unexcoff.c. · 5f2f0bc1
      Eli Zaretskii authored
       unexcoff.c (report_error, make_hdr, write_segment)
       (copy_text_and_data, copy_sym, mark_x, adjust_lnnoptrs, unexec):
       Convert argument lists and prototypes to ANSI C.
       (make_hdr, write_segment): Remove unused variables.
       (unexec): Remove commented-out line.  Initialize `new' to shut up
       compiler warnings.
      5f2f0bc1
  30. 13 Aug, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix fallout from 2010-07-29T03:25:08Z!dann@ics.uci.edu, remove dead code in unexcoff.c. · 8ee81892
      Eli Zaretskii authored
       unexcoff.c: Remove the parts used when "emacs" is not defined.
       (report_error, report_error_1): Ditto.
       (write_segment): Remove "#if 0" unused code.
       (make_hdr): Remove code that was "#ifndef NO_REMAP" before
       NO_REMAP was removed (in 2010-07-29T03:25:08Z!dann@ics.uci.edu).
       (start_of_text): Remove unused function (was used only if NO_REMAP
       was NOT defined).
      8ee81892
  31. 05 Aug, 2010 1 commit
    • Eli Zaretskii's avatar
      Rename src/unexec.c => src/unexcoff.c. · 29cf3e20
      Eli Zaretskii authored
       src/unexcoff.c: Renamed from unexec.c.
       src/deps.mk (unexcoff.o): Rename unexec.[co] => unexcoff.[co].
       configure.in (UNEXEC_OBJ): Rename unexec.o => unexcoff.o.
       admin/MAINTAINERS: Rename src/unexec.c => src/unexcoff.c.
       etc/AUTHORS: Rename unexec.o => unexcoff.o.
       etc/PROBLEMS: Rename unexec.o => unex*.o.
       lisp/emacs-lisp/find-gc.el (find-gc-source-files): Rename
       unexec.c => unexcoff.c.
       lisp/emacs-lisp/authors.el (authors-fixed-entries): Rename
       unexec.c => unexcoff.c.
       msdos/sed1v2.inp (UNEXEC_OBJ): Edit to unexcoff.o, due to renaming of
       unexec.c => unexcoff.c.
      29cf3e20
  32. 29 Jul, 2010 1 commit
    • Dan Nicolaescu's avatar
      Clean up unexec.c, remove references to unused code. · 76fd1ee9
      Dan Nicolaescu authored
      * nt/config.nt: Remove code referring to NO_REMAP, unused.
      
      * src/unexec.c (make_hdr): Remove references to NO_REMAP, COFF,
      SEGMENT_MASK, SECTION_ALIGNMENT, ADJUST_EXEC_HEADER.
      * src/s/usg5-4.h (COFF):
      * src/s/template.h:
      * src/s/msdos.h (COFF, NO_REMAP):
      * src/s/ms-w32.h (NO_REMAP):
      * src/s/hpux10-20.h (NO_REMAP):
      * src/m/sparc.h (SEGMENT_MASK):
      * src/m/m68k.h (NO_REMAP):
      * src/m/intel386.h (SEGMENT_MASK):
      * src/m/arm.h (NO_REMAP):
      * src/m/alpha.h (COFF):
      * src/m/template.h: Remove references to unused defines.
      76fd1ee9
  33. 08 Jul, 2010 1 commit
    • Dan Nicolaescu's avatar
      Simplify start_of_data, start_of_text and related code. · 313d9eb2
      Dan Nicolaescu authored
      * src/mem-limits.h: Remove !emacs and _LIBC conditional code.
      (start_of_data): Merge into start_of_data function.
      * src/sysdep.c (start_of_text): Remove.  Move simplified versions of
      it in the only users: src/unexaix.c and unexec.c.
      (read_input_waiting): Remove local declaration of quit_char.
      (start, etext): Remove declarations.
      (start_of_data): Merge with the version in mem-limits.h and move
      to vm-limits.c.
      * src/vm-limit.c (start_of_data): Merged and simplified version of the
      code formerly in mem-limits.h and sysdep.c.
      * src/unexec.c (start): New declaration, moved from sysdep.c.
      (start_of_text): Simplified version of the code formerly in sysdep.c.
      * unexaix.c (start_of_text): Simplified version of the code
      formerly in sysdep.c.
      * src/m/alpha.h (HAVE_TEXT_START): Remove.
      (TEXT_START): Move ...
      * src/unexalpha.c (TEXT_START): ... here.
      * src/s/hpux10-20.h (TEXT_START): Remove.
      * src/s/darwin.h (TEXT_START):
      * src/m/mips.h (TEXT_START):
      * src/m/macppc.h (HAVE_TEXT_START):
      * src/m/m68k.h (TEXT_START):
      * src/m/iris4d.h (TEXT_START):
      * src/m/intel386.h (TEXT_START):
      * src/m/ibmrs6000.h (TEXT_START):
      * src/m/ia64.h (HAVE_TEXT_START):
      * src/s/msdos.h (TEXT_START): Likewise.
      313d9eb2
  34. 07 Jul, 2010 1 commit
    • Andreas Schwab's avatar
      Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp · 72af86bd
      Andreas Schwab authored
      * alloc.c (overrun_check_malloc, overrun_check_realloc)
      (overrun_check_free, xstrdup, allocate_string)
      (allocate_string_data, compact_small_strings, Fmake_string)
      (make_unibyte_string, make_multibyte_string)
      (make_string_from_bytes, make_specified_string, make_float)
      (Fcons, allocate_terminal, allocate_frame, make_pure_string)
      (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
      memcpy, memmove, memset, memcmp.
      * atimer.c (start_atimer, set_alarm): Likewise.
      * buffer.c (clone_per_buffer_values, report_overlay_modification)
      (mmap_realloc, init_buffer_once): Likewise.
      * callint.c (Fcall_interactively): Likewise.
      * callproc.c (Fcall_process, Fcall_process_region, child_setup)
      (getenv_internal_1): Likewise.
      * casefiddle.c (casify_object): Likewise.
      * ccl.c (ccl_driver): Likewise.
      * character.c (str_as_multibyte, str_to_multibyte): Likewise.
      * charset.c (load_charset_map_from_file)
      (load_charset_map_from_file, load_charset_map_from_vector)
      (Fdefine_charset_internal): Likewise.
      * cm.c (Wcm_clear): Likewise.
      * coding.c (decode_eol, decode_coding_object)
      (Fset_coding_system_priority, make_subsidiaries): Likewise.
      * data.c (Faset): Likewise.
      * dired.c (directory_files_internal, file_name_completion_stat):
      Likewise.
      * dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
      (clear_glyph_row, copy_row_except_pointers)
      (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
      (save_current_matrix, restore_current_matrix)
      (build_frame_matrix_from_leaf_window, mirrored_line_dance)
      (mirror_line_dance, scrolling_window): Likewise.
      * doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
      Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (Fuser_full_name, make_buffer_string_both)
      (Fmessage_box, Fformat, Ftranspose_regions): Likewise.
      * emacs.c (sort_args): Likewise.
      * eval.c (Fapply, Ffuncall): Likewise.
      * fileio.c (Ffile_name_directory, make_temp_name)
      (Fexpand_file_name, search_embedded_absfilename)
      (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
      (auto_save_error): Likewise.
      * fns.c (Fstring_equal, Fcopy_sequence, concat)
      (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
      (internal_equal, Fclear_string, larger_vector, copy_hash_table)
      (Fmake_hash_table): Likewise.
      * fringe.c (Fdefine_fringe_bitmap): Likewise.
      * ftfont.c (ftfont_text_extents): Likewise.
      * getloadavg.c (getloadavg): Likewise.
      * image.c (define_image_type, make_image, make_image_cache)
      (x_create_x_image_and_pixmap, xbm_image_p)
      (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
      (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
      (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
      (png_image_p, png_read_from_memory, png_load, jpeg_image_p)
      (tiff_image_p, tiff_read_from_memory, gif_image_p)
      (gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
      Likewise.
      * indent.c (scan_for_column, compute_motion): Likewise.
      * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
      (insert_1_both, insert_from_gap, replace_range_2): Likewise.
      * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
      * keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
      (kbd_buffer_store_event_hold, apply_modifiers_uncached)
      (store_user_signal_events, menu_bar_items, tool_bar_items)
      (process_tool_bar_item, append_tool_bar_item)
      (read_char_minibuf_menu_prompt, read_key_sequence)
      (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
      Likewise.
      * keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
      Likewise.
      * lisp.h (STRING_COPYIN): Likewise.
      * lread.c (Fload, read1, oblookup): Likewise.
      * msdos.c (Frecent_doskeys): Likewise.
      * nsfns.m (Fx_create_frame): Likewise.
      * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
      Likewise.
      * nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
      (EmacsImage-initForXPMWithDepth:width:height:flip:length:):
      Likewise.
      * nsmenu.m (ns_update_menubar): Likewise.
      * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
      * print.c (print_unwind, printchar, strout, print_string)
      (print_error_message): Likewise.
      * process.c (conv_lisp_to_sockaddr, set_socket_option)
      (Fmake_network_process, Fnetwork_interface_list)
      (Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
      (init_process): Likewise.
      * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
      * regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
      Likewise.
      * scroll.c (do_scrolling, do_direct_scrolling)
      (scrolling_max_lines_saved): Likewise.
      * search.c (search_buffer, wordify, Freplace_match): Likewise.
      * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
      * syntax.c (skip_chars, skip_syntaxes): Likewise.
      * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
      (emacs_set_tty): Likewise.
      * term.c (encode_terminal_code, calculate_costs)
      (produce_special_glyphs, create_tty_output, init_tty, delete_tty):
      Likewise.
      * termcap.c (tgetst1, gobble_line): Likewise.
      * termhooks.h (EVENT_INIT): Likewise.
      * tparam.c (tparam1): Likewise.
      * unexalpha.c (unexec): Likewise.
      * unexec.c (write_segment): Likewise.
      * unexmacosx.c (unexec_write_zero): Likewise.
      * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
      (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
      * w32font.c (w32font_list_family, w32font_text_extents)
      (w32font_list_internal, w32font_match_internal)
      (w32font_open_internal, compute_metrics, Fx_select_font):
      Likewise.
      * w32menu.c (set_frame_menubar, add_menu_item)
      (w32_menu_display_help, w32_free_submenu_strings): Likewise.
      * w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
      * w32uniscribe.c (uniscribe_list_family): Likewise.
      * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
      * window.c (make_window, replace_window, set_window_buffer)
      (Fsplit_window): Likewise.
      * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
      (add_to_log, message3, x_consider_frame_title)
      (append_space_for_newline, extend_face_to_end_of_line)
      (decode_mode_spec_coding, init_glyph_string): Likewise.
      * xfaces.c (x_create_gc, get_lface_attributes_no_remap)
      (Finternal_copy_lisp_face, Finternal_merge_in_global_face)
      (face_attr_equal_p, make_realized_face, make_face_cache)
      (free_realized_faces, lookup_named_face, smaller_face)
      (face_with_height, lookup_derived_face)
      (x_supports_face_attributes_p, Finternal_set_font_selection_order)
      (Finternal_set_font_selection_order, realize_default_face)
      (compute_char_face, face_at_buffer_position)
      (face_for_overlay_string, face_at_string_position, merge_faces):
      Likewise.
      * xfns.c (xic_create_fontsetname, Fx_create_frame)
      (Fx_window_property, x_create_tip_frame)
      (Fx_backspace_delete_keys_p): Likewise.
      * xfont.c (xfont_list, xfont_match, xfont_list_family)
      (xfont_text_extents): Likewise.
      * xmenu.c (set_frame_menubar, xmenu_show): Likewise.
      * xrdb.c (magic_file_p, x_get_resource): Likewise.
      * xselect.c (x_queue_event, x_get_window_property)
      (receive_incremental_selection): Likewise.
      * xsmfns.c (x_session_check_input): Likewise.
      * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
      (handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
      Likewise.
      * character.h (BCOPY_SHORT): Removed.
      * config.in: Regenerate.
      * dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
      * emacs.c (main) [PROFILING]: Don't declare
      dump_opcode_frequencies.
      * lisp.h (safe_bcopy): Remove declaration.
      (memset) [!HAVE_MEMSET]: Declare.
      (memcpy) [!HAVE_MEMCPY]: Likewise.
      (memmove) [!HAVE_MEMMOVE]: Likewise.
      (memcmp) [!HAVE_MEMCMP]: Likewise.
      * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
      (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
      Don't define.
      (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
      * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
      (BCOPY_DOWNWARD_SAFE): Don't define.
      * sysdep.c (memset) [!HAVE_MEMSET]: Define.
      (memcpy) [!HAVE_MEMCPY]: Define.
      (memmove) [!HAVE_MEMMOVE]: Define.
      (memcmp) [!HAVE_MEMCMP]: Define.
      
      * config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
      (HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
      
      * sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
      (HAVE_BZERO): Don't edit.
      
      * lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
      (malloc_widget_value, free_widget_info, allocate_widget_instance)
      (lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
      memset, memcpy, memcmp.
      * lwlib-utils.c (XtApplyToWidgets): Likewise.
      * xlwmenu.c (XlwMenuInitialize): Likewise.
      * lwlib.h (lwlib_bcopy): Remove declaration.
      
      * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
      memcpy, memmove, memset.
      * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
      
      * CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
      (GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
      Remove.
      
      * configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
      <strings.h> and don't define bcopy, bzero, BCMP in config.h.
      72af86bd
  35. 02 Apr, 2010 1 commit
    • Dan Nicolaescu's avatar
      Remove extern errno declarations. · 42a2c622
      Dan Nicolaescu authored
      * xterm.c:
      * xrdb.c:
      * w32term.c:
      * unexec.c:
      * unexaix.c:
      * sysdep.c:
      * process.c:
      * lread.c:
      * keyboard.c:
      * floatfns.c:
      * filelock.c:
      * fileio.c:
      * emacs.c (main):
      * ecrt0.c:
      * dispnew.c:
      * callproc.c:
      * buffer.c: Remove errno extern declarations.
      * s/netbsd.h (NEED_ERRNO): Remove.
      
      * movemail.c:
      * etags.c:
      * emacsclient.c: Remove extern errno declarations.
      42a2c622
  36. 01 Apr, 2010 1 commit
    • Eli Zaretskii's avatar
      Remove support for DJGPP v1.x (bug#5813). · ed68db4d
      Eli Zaretskii authored
       src/:
       w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility.
       s/msdos.h: 
       unexec.c (make_hdr, copy_text_and_data): 
       sysdep.c (wait_for_termination, sys_subshell): 
       msdos.c (dos_set_window_size, msdos_set_cursor_shape)
       (IT_set_terminal_modes): 
       (__write, _rename, gethostname, gettimeofday, alarm, fork, kill)
       (dos_ttraw, dos_ttcooked, run_msdos_command, abort): Remove DJGPP
       v1.x code and tests of the value of __DJGPP__.
       (nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x
       compatibility code.
       lread.c: 
       gmalloc.c (memalign): 
       fileio.c (Fcopy_file, check_executable, Ffile_modes): 
       emacs.c (main): 
       dosfns.c (init_dosfns): 
       dired.c (file_name_completion_stat): Remove tests of __DJGPP__.
      
       msdos/:
       sed3.inp:
       sed2.inp:
       sed1.inp:
       mainmake: Files removed.
      ed68db4d