summaryrefslogtreecommitdiff
path: root/lib-src
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add support for Mercury (https://mercurylang.org) in 'etags'Fabrice Nicol2021-06-061-4/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag declarations starting lines with ':-'. By default, all declarations are tagged. Optionally, first predicate or functions in clauses can be tagged as in Prolog support using '--declarations'. (Bug#47408). * lib-src/etags.c (test_objc_is_mercury, Mercury_functions) (mercury_skip_comment, mercury_decl, mercury_pr): Implement Mercury support. As Mercury and Objective-C have the same file extension .m, a heuristic test tries to detect the language. * doc/man/etags.1: Document the change. Add Mercury-specific behavior for '--declarations'. This option tags first predicates or functions in clauses in addition to declarations.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-05-192-3/+53
|\|
| * Add support for Rust in etagsPierre-Antoine Rouby2021-05-171-0/+51
| | | | | | | | | | | | | | | | * lib-src/etags.c (Rust_functions): New function to make tags for rust files. (Rust_help, Rust_suffixes): New constant. * doc/emacs/maintaining.texi (Tag Syntax): Add Rust item. * doc/man/etags.1: Add Rust (bug#46055).
| * * lib-src/Makefile.in (clean): Tidy up seccomp-filter files.Glenn Morris2021-05-091-0/+1
| |
| * Base the "extraclean" Make rule on "maintainer-clean"Glenn Morris2021-05-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (FIND_DELETE): New, set by configure. (extraclean_dirs): Remove. (extraclean): Make it just a small variation on maintainer-clean. * admin/charsets/Makefile.in (extraclean): * admin/grammars/Makefile.in (extraclean): * admin/unidata/Makefile.in (extraclean): * leim/Makefile.in (extraclean): * lib-src/Makefile.in (extraclean): * lisp/Makefile.in (extraclean): * lwlib/Makefile.in (extraclean): * nt/Makefile.in (extraclean): * src/Makefile.in (extraclean): Remove target. * lib/Makefile.in (extraclean): Merge into maintainer-clean.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-04-251-4/+11
|\|
| * Ensure that argument to 'verify' is a constant expression.Philipp Stephani2021-04-221-1/+2
| | | | | | | | | | | | | | Casting NULL is not a constant expression (Bug#47951). * lib-src/seccomp-filter.c (main): Turn check for null pointer representation into a runtime assertion.
| * Seccomp filter: deal with arch_prctl(ARCH_CET_STATUS, ...).Philipp Stephani2021-04-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamic loader of GNU libc 2.28 uses this system call to initialize CPU information, see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/cpu-features.c;hb=glibc-2.28#l28. Simulating an older kernel by returning EINVAL should be the most harmless rule here. The ARCH_CET_STATUS symbol isn't yet exposed by the kernel headers; see the FIXME at the top of https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/include/asm/prctl.h;hb=glibc-2.28. * lib-src/seccomp-filter.c (ARCH_CET_STATUS): Define if not already present. Inline the value because there doesn't seem to be a header file exporting this constant yet. (main): Make ARCH_CET_STATUS subfunction of arch_prctl return EINVAL.
| * Fix Seccomp filter on CentOS 8.3 (Bug#47828).Philipp Stephani2021-04-181-3/+3
| | | | | | | | * lib-src/seccomp-filter.c (main): mmap: Also allow MAP_SHARED.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-04-182-0/+402
|\|
| * * lib-src/seccomp-filter.c: Add missing headers.Philipp Stephani2021-04-121-0/+2
| |
| * Generate Seccomp filters only if we have the necessary constants.Philipp Stephani2021-04-121-0/+3
| | | | | | | | | | | | | | | | | | | | If we're missing SECCOMP_SET_MODE_FILTER, the seccomp-filter build fails. Reuse the existing HAVE_SECCOMP configuration variable, which checks for these macros. * configure.ac (HAVE_SECCOMP): Substitute in Makefile.in. * lib-src/Makefile.in (HAVE_SECCOMP): New variable. (SECCOMP_FILTER): Define only if HAVE_SECCOMP.
| * Add a variant of the Seccomp filter file that allows 'execve'.Philipp Stephani2021-04-112-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when starting Emacs with a Seccomp filter enabled, e.g. using 'bwrap'. * lib-src/seccomp-filter.c (main): Generate new Seccomp files. * lib-src/Makefile.in (all) (seccomp-filter.bpf seccomp-filter.pfc seccomp-filter-exec.bpf seccomp-filter-exec.pfc): Generate new Seccomp files. * .gitignore: Ignore new Seccomp files. * test/src/emacs-tests.el (emacs-tests/bwrap/allows-stdout): New unit test.
| * * lib-src/seccomp-filter.c (main): Also allow O_NOFOLLOW.Philipp Stephani2021-04-111-2/+2
| |
| * Don't attempt to generate Seccomp filter file in Linux < 4.14.Philipp Stephani2021-04-111-0/+6
| | | | | | | | | | | | | | | | Only Linux 4.14 and later contain the required support for SECCOMP_RET_KILL_PROCESS. * lib-src/Makefile.in (SECCOMP_FILTER): Define only if we run at least Linux 4.14.
| * Seccomp filter: allow reading the current time (Bug#47708).Philipp Stephani2021-04-111-0/+7
| | | | | | | | * lib-src/seccomp-filter.c (main): Allow reading the current time.
| * Use pkg-config to check for libseccomp.Philipp Stephani2021-04-111-3/+6
| | | | | | | | | | | | | | | | | | | | We need at list version 2.4.0 of libseccomp for seccomp-filter.c to build cleanly. * configure.ac: Use pkg-config to check for libseccomp. * lib-src/Makefile.in (HAVE_LIBSECCOMP, LIBSECCOMP_LIBS) (LIBSECCOMP_CFLAGS): New variables. (SECCOMP_FILTER, seccomp-filter$(EXEEXT)): Use them.
| * Remove SCMP_FLTATR_CTL_LOG attribute from Seccomp filter.Philipp Stephani2021-04-111-1/+0
| | | | | | | | | | | | | | Whether or not we log failing syscalls isn't security-critical, and we shouldn't care. * lib-src/seccomp-filter.c (main): Remove log attribute.
| * Only attempt to generate seccomp filter files on x86-64 systems.Philipp Stephani2021-04-111-2/+9
| | | | | | | | | | | | | | | | The seccomp filters are always architecture-specific, and seccomp-filter.c right now only supports x86-64. * lib-src/Makefile.in (SECCOMP_FILTER): New variable. (DONT_INSTALL, all, seccomp-filter$(EXEEXT)): Use it.
| * * lib-src/seccomp-filter.c: Print trailing newline.Philipp Stephani2021-04-111-1/+4
| |
| * ; Fix copyright yearsGlenn Morris2021-04-101-1/+1
| |
| * Add a helper binary to create a basic Secure Computing filter.Philipp Stephani2021-04-102-0/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary uses the 'seccomp' helper library. The library isn't needed to load the generated Secure Computing filter. * configure.ac: Check for 'seccomp' header and library. * lib-src/seccomp-filter.c: New helper binary to generate a generic Secure Computing filter for GNU/Linux. * lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper binary if possible. (all): Add Secure Computing filter file if possible. (seccomp-filter$(EXEEXT)): Compile helper binary. (seccomp-filter.bpf seccomp-filter.pfc): Generate filter files. * test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout) (emacs-tests/seccomp/forbids-subprocess): New unit tests. * test/Makefile.in (src/emacs-tests.log): Add dependency on the helper binary.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-03-081-27/+2
|\|
| * Simplify silent-rules build machineryGlenn Morris2021-03-061-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/verbose.mk.in: New file. * configure.ac (AM_V, AM_DEFAULT_V): Remove output variables. (src/verbose.mk): New output file. * Makefile.in, admin/charsets/Makefile.in: * admin/grammars/Makefile.in, admin/unidata/Makefile.in: * doc/emacs/Makefile.in, doc/lispintro/Makefile.in: * doc/lispref/Makefile.in, doc/misc/Makefile.in, leim/Makefile.in: * lib-src/Makefile.in, lib/Makefile.in, lisp/Makefile.in: * lwlib/Makefile.in, nt/Makefile.in, oldXMenu/Makefile.in: * src/Makefile.in, src/verbose.mk.in, test/Makefile.in: Include src/verbose.mk rather than repeatedly defining AM_V_at etc.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-01-0315-18/+23
|\|
| * Port to Solaris 10Paul Eggert2021-01-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Merge from origin/emacs-27Paul Eggert2021-01-011-1/+1
| |\ | | | | | | | | | 33d159c36f Fix copyright years by hand
| | * Fix copyright years by handPaul Eggert2021-01-011-1/+1
| | | | | | | | | | | | These are dates that admin/update-copyright did not update.
| | * Update copyright year to 2021Paul Eggert2021-01-0115-15/+15
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
| | * Fix crash (segfault) in etags on generating tags for Erlang filesSerge Tupchii2020-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c: Set allocated and lastlen to zero, after freeing last ptr in Erlang_functions to prevent dereferencing NULL pointer (bug#45122). Copyright-paperwork-exempt: yes (cherry picked from commit 2d8f0364fcd1d5dad2b82dd3a9af870b03854547)
| * | Update copyright year to 2021Paul Eggert2021-01-0115-15/+15
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2020-12-273-43/+17
|\| |
| * | Adjust to recent Gnulib changesPaul Eggert2020-12-253-43/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2020-12-141-0/+1
|\| |
| * | Fix crash (segfault) in etags on generating tags for Erlang filesSerge Tupchii2020-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c: Set allocated and lastlen to zero, after freeing last ptr in Erlang_functions to prevent dereferencing NULL pointer (bug#45122). Copyright-paperwork-exempt: yes
* | | emacsclient should use both of DISPLAY and WAYLAND_DISPLAY.Yuuki Harano2020-11-241-0/+5
|/ / | | | | | | | | | | | | * lisp/server.el (server-create-window-system-frame): error out when not on a supported window * lib-src/emacsclient.c (decode_options): handle WALAND_DISPLAY on PGTK
* | Merge from origin/emacs-27Glenn Morris2020-11-162-23/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | 75723ec212 (origin/emacs-27) ; * lisp/emacs-lisp/benchmark.el (benchm... 53e2a612ad ; * lib-src/make-fingerprint.c: Update commentary. 286c632772 Reformat argument commentary in etags.c 4ec740866a Make the invocation of combine-change-calls in comment-reg... 66bcec8838 * lisp/progmodes/cc-langs.el (c-<>-notable-chars-re): Fix ... 03eeab469e ; Update the expected result files in test/manual/etags. d875a22bc6 Update the various INSTALL files # Conflicts: # INSTALL
| * ; * lib-src/make-fingerprint.c: Update commentary.Glenn Morris2020-11-151-3/+6
| |
| * Reformat argument commentary in etags.cEli Zaretskii2020-11-151-20/+16
| | | | | | | | | | * lib-src/etags.c (pfnote, consider_token, C_entries): Resurrect original format of comments to function arguments.
| * ; Fix more trivial typosStefan Kangas2020-09-211-1/+1
| |
* | Mark the return value from strerror as a constantPhilipp Klaus Krause2020-10-141-1/+1
| | | | | | | | | | | | | | | | | | * src/emacs.c (main): Mark the return from strerror as a constant, since it shouldn't be changed (bug#43982). * lib-src/movemail.c (pfatal_and_delete): Ditto. Copyright-paperwork-exempt: yes
* | ; Fix trivial typos in ChangeLogsStefan Kangas2020-10-031-4/+4
| |
* | ; Fix typosStefan Kangas2020-09-211-1/+1
| |
* | Don't output emacsclient warning if both -a and --quietLars Ingebrigtsen2020-08-131-5/+11
| | | | | | | | | | | | * lib-src/emacsclient.c (set_local_socket): Don't output the warning if both -a and --quiet are specified (bug#16117). Inspired by a patch from Scott Turner <srt19170@gmail.com>.
* | Merge from origin/emacs-27Glenn Morris2020-05-281-2/+5
|\| | | | | | | | | | | | | e7a3ed8a6d Fix tab-bar-tab-name-ellipsis initialization 4737d0af75 Fix Elisp manual entry for format-spec 0195809bb6 Fix rare assertion violations in 'etags' cddb0079ff ; * lisp/format-spec.el (format-spec): Fix typo.
| * Fix rare assertion violations in 'etags'Eli Zaretskii2020-05-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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 etags.
* | Port etags FALLTHROUGH to C2XPaul Eggert2020-05-231-1/+1
| | | | | | | | | | | | | | Problem reported by Ashish SHUKLA in: https://lists.gnu.org/r/emacs-devel/2020-05/msg03013.html * lib-src/etags.c (C_entries): Move label so that FALLTHROUGH precedes a case label, as draft C2X specifies.
* | * lib-src/Makefile.in (LINK_CFLAGS): Remove; unused.Paul Eggert2020-04-041-2/+0
| |
* | Stop using newly-deprecated dosname Gnulib modulePaul Eggert2020-03-281-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | Pacify GCC 9.2.1 20190927 -O3Paul Eggert2020-03-041-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | Original problem report by N. Jackson in: https://lists.gnu.org/r/emacs-devel/2020-03/msg00047.html 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) (ATTRIBUTE_RETURNS_NONNULL): New macros. * src/editfns.c (Fuser_full_name): Don’t assume Fuser_login_name returns non-nil. * src/intervals.c (rotate_right, rotate_left, update_interval): * src/intervals.h (LENGTH, LEFT_TOTAL_LENGTH, RIGHT_TOTAL_LENGTH): 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.