1. 01 Jan, 2020 1 commit
  2. 07 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Remove printmax_t etc. · 8f522efe
      Paul Eggert authored
      printmax_t etc. were needed only for platforms that lacked
      support for printing intmax_t.  These platforms are now so
      obsolete that they are no longer practical porting targets.
      * src/image.c (gs_load): Fix unlikely buffer overrun
      discovered while making these changes.  It was introduced in
      * src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
      Remove.  All uses replaced by their standard counterparts
      intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
  3. 30 May, 2019 1 commit
  4. 01 Jan, 2019 1 commit
  5. 01 Jan, 2018 1 commit
  6. 24 Oct, 2017 1 commit
  7. 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.
  8. 20 Jun, 2017 1 commit
    • Paul Eggert's avatar
      Fix crash when built by GNU Gold linker on x86 · fb45f707
      Paul Eggert authored
      Problem reported by Andrés Musetti (Bug#27248).
      * src/widget.c (emacsFrameClassRec): Do not initialize superclass here.
      (emacsFrameClass): Now a function (which initializes the
      superclass) instead of a variable.  All uses changed.
  9. 01 Jan, 2017 1 commit
  10. 07 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Clean out some IRIX cruft · 8e5a7699
      Paul Eggert authored
      * etc/MACHINES: Remove obsolete discussion of IRIX.
      * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code.
      (create_process) [HAVE_PTYS]: Don't worry about IRIX.
      * src/syntax.c (scan_sexps_forward): Remove obsolete comment.
      * src/unexelf.c [__sgi]: Don't include <syms.h>.
      (unexec) [__sgi]: Remove SGI-specific code.
  11. 08 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Port to FreeBSD 11 AMD · 3b5e6774
      Paul Eggert authored
      Problem reported by Ashish Shukla (Bug#24892).  I tested
      this on FreeBSD 11 x86-64 with HAVE_SBRK manually undefined.
      * configure.ac (system_malloc): Set to 'yes' if there is no sbrk.
      (sbrk): Check whether it exists.
      * src/alloc.c (my_heap_start) [!GNU_LINUX]:
      Do not define, since this function is now used only on GNU/Linux,
      and sbrk might not exist on other platforms.
      (malloc_initialize_hook) [!GNU_LINUX]:
      Do not call my_heap_start, since its side effect will never be used.
      (Fmemory_limit) [!HAVE_SBRK]: Do not call sbrk.
      * src/unexelf.c (unexec) [!HAVE_SBRK]: Assume that nothing like
      sbrk exists.
  12. 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.
  13. 07 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Remove support for IRIX · 6bc8689c
      Paul Eggert authored
      The IRIX port wasn’t really working anyway, and the code was
      getting in the way of other changes (e.g., getaddrinfo fixes).
      IRIX’s supplier dropped support for IRIX in 2013.
      * admin/CPP-DEFINES:
      * configure.ac (opsys):
      * doc/lispref/os.texi (System Environment):
      * etc/MACHINES, etc/PROBLEMS:
      * lisp/find-dired.el (find-grep-options):
      * lisp/lpr.el (lpr-lp-system):
      * lisp/ls-lisp.el (ls-lisp-emulation):
      * lisp/mail/rmail.el (rmail-spool-directory):
      * lisp/net/net-utils.el (ping-program-options):
      * lisp/progmodes/gud.el (gud-irix-p, gud-dbx-use-stopformat-p):
      * lisp/progmodes/ps-mode.el (ps-mode-print-function):
      * src/conf_post.h [IRIX6_5]:
      * src/emacs.c (Vsystem_type):
      * src/filelock.c (get_boot_time_1):
      * src/process.c (process_send_signal):
      * src/unexelf.c (unexec):
      Omit IRIX-specific code and/or documentation.
      * configure.ac (NON_GCC_TEST_OPTIONS, IRIX6_5, PREFER_VSUSP):
      Remove.  All uses removed.
      * etc/NEWS: Document the change.
  14. 30 Jan, 2016 3 commits
    • Paul Eggert's avatar
      * src/alloc.c: Include "sheap.h". · e4cd4a76
      Paul Eggert authored
      (alloc_unexec_pre, alloc_unexec_post) [HYBRID_MALLOC]:
      Set and clear bss_sbrk_did_unexec, on all platforms not just Cygwin.
      * src/lisp.h (alloc_unexec_pre, alloc_unexec_post) [!DOUG_LEA_MALLOC]:
      Declare unconditionally.
      * src/unexcw.c, src/unexelf.c (bss_sbrk_did_unexec): Remove decl.
      (unexec): Don’t set or clear bss_sbrk_did_unexec;
      the caller now does this.
    • Paul Eggert's avatar
      Pacify GCC on extern decls · 384ffef6
      Paul Eggert authored
      * src/unexelf.c (bss_sbrk_did_unexec): Move decl to top level
      to pacify recent GCC (Bug#22086).
    • Rich Felker's avatar
      unexelf.c hook to support HYBRID_MALLOC on ELF · dec13908
      Rich Felker authored
      * src/unexelf.c (unexec) [HYBRID_MALLOC]:
      Define bss_sbrk_did_unexec (Bug#22086).
      Copyright-paperwork-exempt: yes
  15. 01 Jan, 2016 1 commit
  16. 17 Nov, 2015 1 commit
    • Paul Eggert's avatar
      ELF unexec: align section header · c9fd597a
      Paul Eggert authored
      This ports the recent unexelf.c changes to Fedora x86-64
      when configured with GCC’s -fsanitize=undefined option.
      * src/unexelf.c (unexec): Align new_data2_size to a multiple
      of ElfW (Shdr)’s alignment, so that NEW_SECTION_H returns a
      pointer aligned appropriately for its type.
  17. 08 Nov, 2015 9 commits
    • Paul Eggert's avatar
    • Alan Modra's avatar
      ELF unexec: Don't insert a new section · 3008c521
      Alan Modra authored
      Reuse the .bss section instead, making it SHT_PROGBITS.  This way we
      don't need to mess with symbol st_shndx, or section sh_link and
      This does lead to eu-elflint complaints about symbols defined in .bss
      with a needed version, because normally it is undefined symbols that
      have needed versions;  Defined symbols have version definitions.
      The exception is symbols defined by the linker in .dynbss for
      variables copied from a shared library in order to avoid text
      relocations, with copy relocs to copy their initial values from the
      shared library.  These symbols are both defined and have needed
      versions, and eu-elflink only expects to see them in SHT_NOBITS
      sections.  Of course there is no real problem with having such symbols
      in SHT_PROGBITS sections.  glibc ld.so handles them fine.
      * unexelf.c: Delete outdated comments.
      (PATCH_INDEX): Delete.
      (find_section): Delete.
      (unexec): Don't add a new section.  Instead reuse the last bss
      section, extending it to cover dumped data.  Make bss sections
      SHT_PROGBITS.  Remove all patching of sh_link, sh_info and
      st_shndx.  Rename bss sections.
    • Alan Modra's avatar
      ELF unexec: Drive from PT_LOAD header rather than sections · 0d644226
      Alan Modra authored
      This rewrites bss handling in the ELF unexec code.  Finding bss
      sections by name results in complicated code that
      - does not account for all names of possible bss sections,
      - assumes specific ordering of bss sections,
      - can wrongly choose a SHT_NOBITS section not in the bss segment,
      - incorrectly calculates bss size (no accounting for alignment gaps),
      - assumes .data and .bss are in the same segment.
      All of these problems and more are solved by finding the bss segment
      in PT_LOAD headers, ie. the address range included in p_memsz but not
      p_filesz of the last PT_LOAD header, then matching SHT_NOBITS sections
      in that address range.
      * unexelf.c: Delete old ppc comment.
      (OLD_PROGRAM_H): Define.
      (round_up): Delete.
      (unexec): Don't search for bss style sections by name.  Instead,
      use the last PT_LOAD header address range covered by p_memsz
      but not p_filesz and match any SHT_NOBITS section in that
      address range.  Simplify initialisation of section header vars.
      Don't assume that section headers are above bss segment.  Move
      copying of bss area out of section loop.  Align .data2 section
      to 1, since it now covers the entire bss area.  For SHT_NOBITS
      sections in the bss segment, leave sh_addr and sh_addralign
      unchanged, but correct sh_offset.  Clear memory corresponding
      to SHT_NOBITS .plt section.  Delete comment and hacks for
      sections partly overlapping bss range now that the full range
      is properly calculated.  Delete now dead .sbss code.
    • Alan Modra's avatar
      ELF unexec: R_*_NONE relocs · 8285c2ab
      Alan Modra authored
      These should be ignored on all targets.
      * unexelf.c (unexec): Ignore R_*_NONE relocs for any target,
      not just Alpha.  Comment on reloc size assumption.
    • Alan Modra's avatar
      ELF unexec: _OBJC_ symbols in bss sections · 3ff9fc0e
      Alan Modra authored
      This code assumed that there was only one bss section.  Rather than
      checking for a particular index, check the section type.  Also, handle
      the possibility that the section was SHT_NOBITS originally and is
      unchanged, in which case no clearing is needed (and sh_offset isn't
      necessarily valid, which can lead to a wild memset).
      * unexelf.c (unexec): Properly handle _OBJC_ symbols in bss sections.
    • Alan Modra's avatar
      ELF unexec: Symbol table patching · 190b968f
      Alan Modra authored
      No st_shndx value larger than SHN_LORESERVE should be changed.
      * unexelf.c (unexec): Don't adjust any st_shndx larger than
    • Alan Modra's avatar
      ELF unexec: Merge Alpha and MIPS COFF debug handling · 47c6e303
      Alan Modra authored
      * unexelf.c (unexec): Merge Alpha and MIPS COFF debug handling.
      Don't find .mdebug section index, find the section in the loop.
      Allow for unlikely possibility that .mdebug is located at sh_offset
      before bss segment, by calculating move from difference in
      sh_offset rather than just assuming new_data2_size.  Simplify
      cbLineOffset handling.
    • Alan Modra's avatar
      ELF unexec: Tidy code · 856f4eab
      Alan Modra authored
      Separate out some of the more mechanical changes so following patches
      are smaller.
      * unexelf.c (unexec): Rearrange initialisation of program
      header vars.  Use pointer vars in loops rather than indexing
      section header array via macros.  Simplify _OBJC_ sym code
      and reloc handling code.
    • Alan Modra's avatar
      ELF unexec: Correct section header index · 0bcd08ef
      Alan Modra authored
      First a small fix.  The code incorrectly uses "NEW_SECTION_H (n)" when
      it should have been using "NEW_SECTION_H (nn)" to find the name of the
      section currently being processed.  Of course, before the bss
      sections, n and nn have the same value, so this doesn't matter except
      in the case of .sbss.  For .sbss this probably meant .bss (most likely
      the next section) was copied from memory.  A later patch removes the
      bogus .sbss handling anyway.
      * unexelf.c (unexec): Use correct index to look up names.
  18. 01 Jan, 2015 2 commits
  19. 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.
  20. 01 Jan, 2014 1 commit
  21. 14 Dec, 2013 1 commit
    • Paul Eggert's avatar
      Use bool for boolean, focusing on headers. · 96c06863
      Paul Eggert authored
      * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK):
      Use bool for boolean.
      * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE):
      Remove.  All uses replaced with uncapitalized version.
      * lib-src/emacsclient.c (message):
      * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names):
      * lib-src/hexl.c (un_flag, iso_flag, endian):
      * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next)
      Use bool for boolean.
      * lib-src/etags.c (bool): Remove.
      * lib-src/etags.c (globals, members, declarations, no_line_directive)
      (no_duplicates): Use 'int' for boolean values that getopt requires
      to be 'int'.  Formerly, these were 'bool' and 'bool' was 'int',
      but we can no longer rely on this implementation.
      * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields.
      * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
      * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c:
      No need to include <stdbool.h>, since conf_post.h does it now.
      * src/ccl.c, src/ccl.h (setup_ccl_program):
      * src/ccl.h (CHECK_CCL_PROGRAM):
      * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
      * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
      * src/coding.c (decode_coding_ccl, encode_coding_ccl):
      * src/conf_post.h (has_attribute):
      * src/dispextern.h (trace_redisplay_p):
      (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
      * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
      (blank_row, prepare_desired_row)
      (build_frame_matrix_from_leaf_window, make_current)
      (mirror_make_current, mirrored_line_dance, mirror_line_dance)
      (update_window, scrolling_window, update_frame_line):
      * src/disptab.h (GLYPH_FOLLOW_ALIASES):
      * src/editfns.c (Fformat):
      * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
      (x_create_bitmap_from_xpm_data, xpm_load_image):
      * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
      (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
      * src/keymap.h (KEYMAPP):
      * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
      * src/systime.h (timespec_valid_p):
      * src/term.c (save_and_enable_current_matrix):
      * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
      * src/xdisp.c (in_display_vector_p, display_tool_bar_line)
      (redisplay_internal, try_window_reusing_current_matrix)
      (sync_frame_with_window_matrix_rows, try_window_id)
      (display_menu_bar, display_tty_menu_item, display_mode_line)
      (coords_in_mouse_face_p, cursor_in_mouse_face_p):
      * src/xmenu.c (xmenu_show):
      * src/xterm.c (use_xim, x_term_init):
      * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
      (struct x_bitmap_record):
      Use bool for booleans.
      * src/ccl.c (struct buffer_text):
      * src/ccl.h (struct ccl_program):
      * src/charset.h (struct charset):
      * src/cm.h (struct cm):
      * src/coding.h (struct iso_2022_spec, struct coding_system):
      * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
      (struct glyph_string, struct face, struct face_cache)
      (struct bidi_string_data, struct bidi_it)
      (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
      (struct image):
      * src/editfns.c (Fformat):
      * src/frame.h (struct frame):
      * src/fringe.c (struct fringe_bitmap):
      * src/intervals.h (struct interval):
      * src/keyboard.h (struct kboard):
      * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
      (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
      (struct Lisp_Buffer_Local_Value, union specbinding):
      * src/macfont.m (struct macfont_info):
      * src/process.h (struct Lisp_Process):
      * src/termchar.h (struct tty_display_info):
      * src/window.h (struct window):
      * src/xterm.h (struct x_output):
      Use bool_bf for boolean bit-fields.
      * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
      All callers changed.
      * src/ccl.h (struct ccl_program): Remove unused members private_state,
      src_multibyte, dst_multibyte, cr_consumed, suppress_error,
      (struct ccl_spec): Remove unused members cr_carryover,
      * src/conf_post.h: Include <stdbool.h>.
      (bool_bf): New type.
      * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
      Surround statement macro with proper 'do { ... } while (false)' brackets.
      (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
      (PRODUCE_GLYPHS): Simplify use of boolean.
      * src/fileio.c (Fcopy_file):
      If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
      * src/lisp.h (UNGCPRO): Return void, not int.
      (FOR_EACH_TAIL): Use void expression, not int expression.
      * src/region-cache.c: Reindent.
      * src/region-cache.h: Copy comments from region-cache.c, to fix
      incorrect remarks about booleans.
  22. 12 Jul, 2013 1 commit
    • 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.
  23. 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.
  24. 07 May, 2013 1 commit
    • Paul Eggert's avatar
      * unexelf.c: Don't assume ElfW (Half) fits in int. · f269bc61
      Paul Eggert authored
      (entry_address, find_section, unexec): Use ptrdiff_t, not int,
      when dealing with ElfW (Half) values, since they can exceed 2**31
      on 64-bit OpenBSD hosts.  Problem reported privately by Han Boetes.
      (entry_address): Omit unused NUM arg.  All uses changed.
  25. 06 May, 2013 1 commit
    • Paul Eggert's avatar
      * unexelf.c: Fix some 32-bit integer problems, notably when debugging. · 5ee94506
      Paul Eggert authored
      Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
      Verify that ElfW (Half) fits in int.
      (fatal): Use same signature as lisp.h.
      (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
      configure and build with -DUNEXELF_DEBUG without worrying about
      other modules that use DEBUG.
      (DEBUG_LOG) [UNEXELF_DEBUG]: New macro.  All debug code that prints
      possibly-wide integers now uses it instead of plain fprintf.
      (entry_address): New function, which avoids problems with 32-bit
      overflow on 64-bit hosts.
      (round_up): Don't assume the remainder fits in int.
      (find_section): Use bool for boolean.  Simplify debug code.
      (unexec): Don't assume file sizes fit in int or size_t.
      Omit unnecessary trailing newline in 'fatal' format.
      Use strerror rather than outputting decimal error number.
      Remove unused code when emacs is not defined;
      this file relies on Emacs now.
      Don't assume e_phnum and e_shnum are positive.
  26. 01 Jan, 2013 1 commit
  27. 16 Nov, 2012 1 commit
  28. 20 Oct, 2012 1 commit
    • Paul Eggert's avatar
      Port to OpenBSD 5.1. · 4973679b
      Paul Eggert authored
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      * xdisp.c (produce_stretch_glyph):
      Declare local vars only when they're needed.
      This is clearer and avoids a warning on OpenBSD about unused vars.
      * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
      This is safer, and avoids OpenBSD warnings about unused vars.
      * keyboard.c (record_menu_key): Remove unnecessary decl.
      (poll_timer): Define only if POLL_FOR_INPUT is defined.
      * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
      as our definition clashes with OpenBSD's.
      * xfaces.c (load_face_colors, check_lface_attrs)
      (get_lface_attributes_no_remap, get_lface_attributes)
      (lface_fully_specified_p, x_supports_face_attributes_p)
      (tty_supports_face_attributes_p, face_fontset, realize_face)
      (realize_x_face, realize_tty_face):
      Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
      merely Lisp_Object *.  This is more informative and avoids
      a warning on OpenBSD about accessing beyond an object's size.
  29. 21 May, 2012 1 commit
    • Paul Eggert's avatar
      Assume C89 or later. · 261cb4bb
      Paul Eggert authored
      * configure.in (AC_C_PROTOTYPES, AC_C_VOLATILE, AC_C_CONST)
      * admin/CPP-DEFINES: Remove NULL, const.
      * lib-src/etags.c (static, const): Remove macros.
      (PTR): Remove; all uses replaced with void *.  Omit needless casts.
      * src/alloc.c, src/buffer.c, lisp.h: Replace POINTER_TYPE with void.
      * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
      * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
      * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
      * textprop.c, tparam.c (NULL): Remove.
      * ralloc.c, vm-limit.c (POINTER): Assume void * works.
      * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
      * regex.h (_RE_ARGS): Remove.  All uses rewritten to use prototypes.
      * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
      * xterm.c (input_signal_count): Assume volatile works.