1. 01 Jan, 2021 4 commits
    • Paul Eggert's avatar
      Port to Solaris 10 · 9076a631
      Paul Eggert authored
      * configure.ac: Instead of AC_CHECK_HEADER, use AC_COMPILE_IFELSE
      with X11/Intrinsic.h when checking for X11/extensions/Xrender.h.
      This suppresses a bogus "report a bug to bug-gnu-emacs" diagnostic
      from 'configure' in Solaris 10.
      (SETUP_SLAVE_PTY): Adjust to recent renaming of forkin to
      std_in in callproc.c.  Needed on Solaris and Unixware.
      * lib-src/Makefile.in (LIB_GETRANDOM, LIBS_ETAGS): New vars,
      needed because on Solaris 10 the Gnulib tempname module now needs
      the -lrt library for clock_gettime.  Throw in the LIB_GETRANDOM
      stuff too while we’re at it; from getrandom.m4 it seems to be
      needed for MingW.
      (LIBS_MOVE, etags_libs): Use them.
      * src/callproc.c [SETUP_SLAVE_PTY]: Include sys/stream.h
      and sys/stropts.h, for SETUP_SLAVE_PTY’s definiens.
      * src/process.c [NEED_BSDTTY]: Don’t include bsdtty.h; hasn’t been
      needed in years.
      [USG5_4]: Don’t include sys/stream.h or sys/stropts.h; these
      directives havbe been moved to callproc.c because the only use of
      SETUP_SLAVE_PTY is there now.
    • Paul Eggert's avatar
      Update copyright year to 2021 · ba05d005
      Paul Eggert authored
      Run "TZ=UTC0 admin/update-copyright".
    • Paul Eggert's avatar
      Fix copyright years by hand · 33d159c3
      Paul Eggert authored
      These are dates that admin/update-copyright did not update.
    • Paul Eggert's avatar
      Update copyright year to 2021 · 8c1fe1e5
      Paul Eggert authored
      Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
  2. 25 Dec, 2020 1 commit
    • Paul Eggert's avatar
      Adjust to recent Gnulib changes · ec8a17e9
      Paul Eggert authored
      The latest Gnulib merge brought in free-posix, which causes 'free'
      to preserve errno.  This lets us simplify some Emacs code that
      calls 'free'.
      * admin/merge-gnulib (GNULIB_MODULES): Add free-posix.
      This module is pulled in by canonicalize-lgpl anyway,
      so we might as well rely on it.
      * lib-src/emacsclient.c (get_current_dir_name):
      Sync better with src/sysdep.c.
      * lib-src/etags.c (process_file_name, etags_mktmp):
      * lib-src/update-game-score.c (unlock_file):
      * src/fileio.c (file_accessible_directory_p):
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      Simplify by assuming that 'free' preserves errno.
      * src/alloc.c (malloc_unblock_input):
      Preserve errno, so that xfree preserves errno.
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      Simplify by using strdup instead of malloc+memcpy.
      No need for realloc (and the old code leaked memory anyway on
      failure); just use free+malloc.
  3. 09 Dec, 2020 1 commit
  4. 08 Dec, 2020 1 commit
  5. 15 Nov, 2020 2 commits
  6. 14 Oct, 2020 1 commit
  7. 03 Oct, 2020 1 commit
  8. 21 Sep, 2020 2 commits
  9. 13 Aug, 2020 1 commit
  10. 24 May, 2020 1 commit
    • Eli Zaretskii's avatar
      Fix rare assertion violations in 'etags' · 0195809b
      Eli Zaretskii authored
      * lib-src/etags.c (pfnote): Instead of raising an assertion when
      we get an empty tag name, return immediately.  (Bug#41465)
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6: Adapt to latest changes in
  11. 23 May, 2020 1 commit
  12. 04 Apr, 2020 1 commit
  13. 28 Mar, 2020 1 commit
    • Paul Eggert's avatar
      Stop using newly-deprecated dosname Gnulib module · 4f41188a
      Paul Eggert authored
      Code is supposed to use the filename module now.
      * admin/merge-gnulib (GNULIB_MODULES): Replace dosname with filename.
      * lib/dosname.h: Remove this forwarding stub.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib-src/emacsclient.c, src/fileio.c:
      Include filename.h instead of dosname.h.
  14. 04 Mar, 2020 1 commit
    • Paul Eggert's avatar
      Pacify GCC 9.2.1 20190927 -O3 · dc3006cf
      Paul Eggert authored
      Original problem report by N. Jackson in:
      I found some other warnings when I used gcc, and fixed them
      with this patch.
      * lib-src/etags.c: Include verify.h.
      (xnmalloc, xnrealloc): Tell the compiler that NITEMS is
      nononnegative and ITEM_SIZE is positive.
      * src/conf_post.h (__has_attribute_returns_nonnull)
      * src/editfns.c (Fuser_full_name): Don’t assume Fuser_login_name
      returns non-nil.
      * src/intervals.c (rotate_right, rotate_left, update_interval):
      Use TOTAL_LENGTH0 or equivalent on intervals that might be null.
      * src/intervals.h (TOTAL_LENGTH): Assume arg is nonnull.
      (TOTAL_LENGTH0): New macro, with the old TOTAL_LENGTH meaning.
      (make_interval, split_interval_right): Add ATTRIBUTE_RETURNS_NONNULL.
      * src/pdumper.c (dump_check_dump_off): Now returns void, since
      no caller uses the return value.  Redo assert to pacify GCC.
      (decode_emacs_reloc): Add a seemingly-random eassume to pacify GCC.
      Ugly, and I suspect due to a bug in GCC.
  15. 16 Jan, 2020 1 commit
    • Robert Pluim's avatar
      Make emacs prefer an existing ~/.emacs.d to an existing XDG location · 13995f31
      Robert Pluim authored
      * doc/emacs/custom.texi (Find Init): Update description of how Emacs
      finds its init file directory and the interaction with
      (Early Init File): Correct XDG location of early-init.el
      * etc/NEWS: Update description to make it clear the ~/.emacs.d is
      preferred, even if the XDG location exists.
      * lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists.
      * lib-src/emacsclient.c (open_config): Prefer home directory the XDG
  16. 01 Jan, 2020 2 commits
  17. 10 Dec, 2019 3 commits
    • Paul Eggert's avatar
      Prefer static to extern in ebrowse · 28578f87
      Paul Eggert authored
      * lib-src/ebrowse.c (info_where, info_cls, info_member)
      (info_position, options, yyival, yytext, yytext_end, yyout)
      (yyline, filename, is_ident, is_digit, is_white, f_append)
      (f_verbose, f_very_verbose, f_structs, f_regexps)
      (f_nested_classes, min_regexp, max_regexp, inbuffer, in)
      (inbuffer_size, string_start, class_table, member_table)
      (namespace_alias_table, global_symbols, current_namespace)
      (all_namespaces, namespace_stack, namespace_stack_size)
      (namespace_sp, tk, keyword_table, search_path)
      (search_path_tail, scope_buffer, scope_buffer_size)
      (scope_buffer_len): Now static.
      (options): Now const.
    • Paul Eggert's avatar
    • Paul Eggert's avatar
  18. 26 Nov, 2019 1 commit
    • Paul Eggert's avatar
      etags: remove some arbitrary limits · cffa5703
      Paul Eggert authored
      etags had undefined behavior if input files, lines, tags, etc.,
      had more than INT_MAX bytes.  Clean up the usage of integer types
      to fix the overflow errors I found.
      * admin/merge-gnulib (GNULIB_MODULES): Add mempcpy.
      * lib-src/etags.c: Include inttypes.h, intprops.h.
      (memcpyz): New function.  Use it to simplify several occurrences
      of memcpy followed by storing a trailing '\0'.
      (xnew): Use xnmalloc, to catch overflow on integer multiplication.
      (xrnew): Change last arg to multiplier.  The type is not needed.
      All callers changed.
      (node, lineno, charno, linecharno, invalidcharno, make_tag):
      (pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets)
      Use intmax_t for line numbers and character positions, instead of
      int or long.
      (linebuffer, make_tag, pfnote, total_size_of_entries, put_entry)
      (in_word_set, C_symtype, token, cstack, pushclass_above):
      (popclass_above, write_classname, consider_token, C_entries)
      (Ruby_functions, Makefile_targets, Lua_functions, TeX_commands)
      (TeX_decode_env, erlang_func, erlang_attribute, erlang_atom)
      (substitute, regex_tag_multiline, nocase_tail, readline_interval)
      (readline, savenstr, concat, etags_getcwd, relative_filename)
      Use ptrdiff_t for object sizes, instead of int or long or unsigned
      or size_t.
      (write_classname, C_entries):
      Avoid sprintf, as the result could exceed INT_MAX bytes
      and then behavior goes haywire.
      (main): Use int, instead of unsigned, for argv counts.
      (get_language_from_filename): Use bool for boolean.
      (Ruby_functions): Prefer strcpy to memcpy when copying "=".
      (linebuffer_setlen): Use ‘if’ instead of ‘while’.
      (memory_full, xnmalloc, xnrealloc): New functions.
      (xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t.
      (xrealloc): Remove; no longer needed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.
  19. 23 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Update some URLs · 946a56a1
      Paul Eggert authored
      This mostly changes http: to https: in URLs.  It also updates
      some URLs that have moved, removes some URLs that no longer
      work, recommends against using procmail (procmail.org no
      longer works), and removes some mentions of the
      no-longer-existing Gmane, LPF and VTW.
      It doesn't update all URLs, just the ones I had time for.
      * GNUmakefile (help):
      * admin/admin.el (manual-doctype-string):
      * admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map):
      * admin/charsets/mapconv:
      * lisp/net/soap-client.el (soap-create-envelope):
      * lisp/org/org.el (org-doi-server-url):
      * lisp/textmodes/bibtex.el (bibtex-generate-url-list):
      Prefer https: to http: un URLs.
  20. 15 Sep, 2019 1 commit
  21. 31 Aug, 2019 1 commit
    • Paul Eggert's avatar
      Check instead of relying on NOTREACHED · 77910055
      Paul Eggert authored
      NOTREACHED was designed for traditional lint decades ago,
      and _Noreturn now normally subsumes its function.
      In the one case in Emacs where NORETURN might help and _Noreturn does
      not, check for NOTREACHED instead of assuming it.
      * lib-src/etags.c (main):
      * src/xterm.c (x_connection_closed):
      Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
      is no longer needed there.  Also, one of the NOTREACHEDs was
      misplaced, which defeated traditional lint checking anyway.
      * lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
      * src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
      so that running with ENABLE_CHECKING catches any internal error
      causing the toplevel Frecursive_edit to return.
  22. 30 Aug, 2019 1 commit
    • Paul Eggert's avatar
      emacsclient: adjust to new config file location · 44f15b63
      Paul Eggert authored
      * lib-src/emacsclient.c (open_config): New arg XDG, to respect
      XDG_CONFIG_HOME, consistently with Emacs proper.  Caller changed.
      Use XDG convention if available, falling back on the old names
      if not.
  23. 12 Jul, 2019 2 commits
  24. 09 Jul, 2019 1 commit
    • Andreas Schwab's avatar
      Make fingerprint handling compatible with LTO · fc41b061
      Andreas Schwab authored
      Tell the compiler that the fingerprint variable is modified unpredictably.
      * lib/fingerprint.h (fingerprint): Remove const.
      * lib/fingerprint.c (fingerprint): Likewise.
      * src/pdumper.c (Fdump_emacs_portable): Cast fingerprint variable.
      (pdumper_load): Likewise.
      * lib-src/make-fingerprint.c (main): Likewise.
  25. 27 Jun, 2019 1 commit
  26. 26 Jun, 2019 1 commit
  27. 25 Jun, 2019 3 commits
    • Paul Eggert's avatar
      Prefer PATH_MAX to MAXPATHLEN · 824f7841
      Paul Eggert authored
      PATH_MAX is standardized, MAXPATHLEN is not.
      Also, the Gnulib pathmax module fixes some rare bugs with PATH_MAX.
      So prefer PATH_MAX to MAXPATHLEN unless we know the latter is
      also correct (for some platform-specific code).
      * admin/merge-gnulib (GNULIB_MODULES): Add pathmax.
      This module was already present, as a dependency of canonicalize-lgpl,
      but now Emacs is using it directly.  Sort.
      * lib-src/emacsclient.c: Include stdint.h, pathmax.h.
      (get_current_dir_name): Sync to current src/sysdep.c.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/sysdep.c: Include pathmax.h.
      Use PATH_MAX instead of MAXPATHLEN.
    • Paul Eggert's avatar
      Avoid some strlen work, primarily via strnlen · d7c68362
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add strnlen.
      * lib-src/etags.c (find_entries):
      * src/emacs.c (main):
      * src/nsmenu.m (parseKeyEquiv:):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/term.c (vfatal):
      Prefer !*X to !strlen (X).
      * lib-src/etags.c (pfnote, add_regex):
      * lib-src/pop.c (pop_open):
      * lib-src/update-game-score.c (main):
      * lwlib/lwlib.c (lw_separator_p):
      * src/doprnt.c (doprnt):
      * src/emacs.c (main):
      * src/inotify.c (inotifyevent_to_event):
      * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item):
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      * src/xdisp.c (store_mode_line_string):
      Use strnlen to avoid unnecessary work with strlen.
      * lib-src/etags.c (Prolog_functions, prolog_pr)
      (Erlang_functions, erlang_func):
      Prefer ptrdiff_t to size_t when either will do.
      (prolog_pr, erlang_func): New arg LASTLEN, to avoid
      unnecessary strlen call. All callers changed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib.
      * lwlib/lwlib.c (lw_separator_p):
      * src/json.c (json_has_prefix):
      Use strncmp to avoid unecessary work with strlen + memcmp.
      * src/process.c (set_socket_option): Use SBYTES instead of strlen.
    • David Hull's avatar
      etags: Fix handling of quoted symbol names in Erlang · f0151e17
      David Hull authored
      * lib-src/etags.c (erlang_attribute): Fix handling of quoted
      symbol names in Erlang (bug#24960).
  28. 24 Jun, 2019 2 commits