summaryrefslogtreecommitdiff
path: root/lib-src
Commit message (Collapse)AuthorAgeFilesLines
* Prefer C23 ckd_* to Gnulib *_WRAPV macrosPaul Eggert2023-05-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C23 has added ckd_add etc. macros with functionality equivalent to the older Gnulib INT_ADD_WRAPV macros, so switch to the more-standard names. * admin/merge-gnulib (GNULIB_MODULES): Add stdckdint. This merely makes the dependency explicit, as we were already using this Gnulib module indirectly. * lib-src/etags.c, src/lisp.h: Include stdckdint.h. * lib-src/etags.c (xnmalloc, xnrealloc): * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string) (mark_memory): * src/bignum.c (emacs_mpz_pow_ui): * src/buffer.c (record_overlay_string, overlay_strings): * src/bytecode.c (exec_byte_code): * src/casefiddle.c (do_casify_multibyte_string): * src/ccl.c (ccl_driver, Fccl_execute_on_string): * src/character.c (char_width, c_string_width) (lisp_string_width, count_size_as_multibyte) (string_escape_byte8): * src/cmds.c (internal_self_insert): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display_interactive): * src/doprnt.c (parse_format_integer): * src/editfns.c (Freplace_buffer_contents, str2num) (styled_format): * src/emacs-module.c (module_global_reference_p) (module_make_global_ref, module_funcall): * src/eval.c (max_ensure_room): * src/fileio.c (blocks_to_bytes): * src/fns.c (Ffillarray): * src/font.c (font_intern_prop): * src/frame.c (check_frame_pixels): * src/gnutls.c (gnutls_hex_string, gnutls_symmetric_aead): * src/gtkutil.c (get_utf8_string): * src/haikuterm.c (haiku_term_init): * src/image.c (xbm_scan, image_to_emacs_colors) (image_detect_edges, png_load_body): * src/keyboard.c (Frecursion_depth): * src/keymap.c (Flookup_key, Fkey_description): * src/lisp.h (modiff_incr, SAFE_ALLOCA_LISP_EXTRA): * src/lread.c (read_bool_vector): * src/pgtkterm.c (pgtk_term_init): * src/regex-emacs.c (regex_compile): * src/term.c (encode_terminal_code): * src/termcap.c (tputs): * src/textconv.c (textconv_query): * src/timefns.c (timespec_ticks, lisp_time_hz_ticks) (Fdecode_time, check_tm_member): * src/tparam.c (tparam1): * src/w32term.c (w32_initialize_display_info): * src/xdisp.c (fill_column_indicator_column, decode_mode_spec): * src/xselect.c (selection_data_size, x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (xm_setup_dnd_targets, x_sync_get_monotonic_time) (x_sync_current_monotonic_time, x_sync_note_frame_times) (x_display_set_last_user_time, x_term_init): Prefer the C23 stdckdint macros to their Gnulib intprops.h counterparts, since C23 is standard.
* Fix movemail fd leakPaul Eggert2023-05-141-1/+1
| | | | | * lib-src/movemail.c (main) [!MAIL_USE_SYSTEM_LOCK]: Fix file descriptor leak, found by GCC 13 -Wanalyzer-fd-leak.
* Fix ebrowse -f buffer overflowPaul Eggert2023-05-141-2/+3
| | | | | * lib-src/ebrowse.c (main): Fix buffer overflow when several -f options are given. Found by GCC 13 -Wanalyzer-allocation-size.
* Fix compilation of lib-src/movemailEli Zaretskii2023-03-221-0/+1
| | | | | * lib-src/movemail.c: Include timespec.h. Reported by Andreas Schwab <schwab@linux-m68k.org>.
* Sleep less in update-game-scorePaul Eggert2023-03-211-4/+2
| | | | | | | | This is mostly to avoid interface hassles with time/srand/rand. * lib-src/update-game-score.c (main): Don’t use ‘srand’ or ‘time’. (lock_file): Don’t sleep if we unlocked the lock file. When sleeping, always just sleep 1 s. This avoids the need for calling ‘time’ and ‘rand’, the utility of which was dubious anyway.
* Avoid backwards clock in movemail timestampsPaul Eggert2023-03-211-1/+1
| | | | | | | * lib-src/movemail.c (mbx_delimit_begin): Use ‘current_timespec’ instead of ‘time’ to generate the user-visible timestamp. This works around the minor glitch caused by glibc bug 30200 <https://sourceware.org/bugzilla/show_bug.cgi?id=30200>.
* Merge from origin/emacs-29Stefan Kangas2023-03-061-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | 1c67e4f895f Fix c-ts-mode indentation d724d7d6785 Fix c-ts-mode indentation 7292b24c801 Fix c-ts-mode indentation 75cdc1afbe5 ; Change font-lock-variable-name-face to font-lock-variab... b1b3af5b90b Update to Org 9.6.1-40-g3d817c 80e1037df44 Add string-interpolation feature to bash-ts-mode 5b8e0b31548 Fix tramp-sh-handle-insert-directory 2258ed01f42 ; Minor fix of last change 9c18af0cfaf * Warn when certain primitives are redefined (bug#61880) 5af695c7479 ; * lib-src/etags.c (print_help): Fix indentation.
| * ; * lib-src/etags.c (print_help): Fix indentation.Eli Zaretskii2023-03-051-2/+2
| |
* | Merge from origin/emacs-29Stefan Kangas2023-02-271-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 267fc6d00c4 ruby-smie-rules: Fix misindentation of a method call afte... 0fde314f6f6 * lib-src/etags.c (process_file_name): Free malloc'ed var... dde9d149af3 ; Improve documentation of loading *.eln files 7c552be89da ; Another doc fix in eglot.el 75c65fcc98e ; Fix last change a3d15c1f749 ; Fix last change ca79b138d42 Eglot: rename and redocument encoding-related functions (... 3e3e6d71be7 Eglot: support positionEncoding LSP capability (bug#61726) b0e87e930e8 Eglot: use faster strategy for moving to LSP positions (b... 5b174b96834 Fix mule-tests in UTF-8 locales 5256392a7ec Fix 'vertical-motion' when display strings are around 0db88d625a7 ; * src/treesit.c (treesit_predicate_match): Fix typo.
| * * lib-src/etags.c (process_file_name): Free malloc'ed vars (bug#61819).Eli Zaretskii2023-02-261-0/+2
| |
* | Omit no-longer-needed SEEK_END workaroundPaul Eggert2023-02-251-5/+0
| | | | | | | | | | * lib-src/ebrowse.c (SEEK_END): Remove; no longer needed on any supported SunOS version.
* | Adjust to recent Gnulib macro renamingPaul Eggert2023-01-071-6/+7
| | | | | | | | Also, remove some references to unused Gnulib macros.
* | Port to current Gnulib file-has-aclPaul Eggert2023-01-061-2/+3
| | | | | | | | | | * lib-src/Makefile.in (FILE_HAS_ACL_LIB): Rename from LIB_HAS_ACL, to adjust to recent Gnulib renaming. All uses changed.
* | Merge from origin/emacs-29Eli Zaretskii2023-01-0117-18/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | cae528457c ; Add 2023 to copyright years. b394359261 Improve documentation of 'isearch-open-overlay-temporary' ab3210e709 Document 'use-package' in the 2 main manuals # Conflicts: # etc/refcards/ru-refcard.tex # lib/explicit_bzero.c # m4/explicit_bzero.m4
| * ; Add 2023 to copyright years.Eli Zaretskii2023-01-0117-18/+18
| |
* | ; * lib-src/etags.c (do_move_file): Fix coding style.Po Lu2022-12-171-1/+1
|/
* Support newer glib versions (Bug#59061)Philipp Stephani2022-12-091-0/+2
| | | | * lib-src/seccomp-filter.c (main): Allow pidfd_open system call
* ; * lib-src/etags.c (escape_shell_arg_string): Minor doc fix.Stefan Kangas2022-12-061-3/+3
|
* Fix etags builds on non-Windows non-MS-DOS machinesMattias Engdegård2022-12-061-3/+3
| | | | | * lib-src/etags.c: In this file, MSDOS is always defined but can be either `true` or `false`, so don't used `defined MSDOS` as a condition.
* ; Fix last change in etags.c.Eli Zaretskii2022-12-061-18/+29
|
* Fix etags local command injection vulnerabilitylu4nx2022-12-061-5/+58
| | | | | | * lib-src/etags.c: (escape_shell_arg_string): New function. (process_file_name): Use it to quote file names passed to the shell. (Bug#59817)
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-011-1/+1
|
* Allow be-resources to failPo Lu2022-11-291-6/+8
| | | | | | * lib-src/be_resources.cc (be_perror): Print additional blurb. (main): Return 0 on failure as well, but print the blurb. Problem reported by the Haiku packager.
* Fix incompatible -t and -r options in emacsclientGregory Heytings2022-11-281-1/+3
| | | | | * lib-src/emacsclient.c (decode_options): Do not allow -t and -r together.
* ; Fix last change in etags.cEli Zaretskii2022-11-271-4/+5
| | | | | | | | * lib-src/etags.c (cleanup_tags_file): Renamed from clean_matched_file_tag. * test/manual/etags/CTAGS.good_update: * test/manual/etags/CTAGS.good_crlf: Update to match the test.
* Fixed ctags local command execute vulnerabilitylu4nx2022-11-271-36/+113
| | | | | | | | | | | | | | * lib-src/etags.c: (clean_matched_file_tag): New function (do_move_file): New function (readline_internal): Add `leave_cr` parameter, if true, include the \r character * test/manual/etags/CTAGS.good_crlf: New file * test/manual/etags/CTAGS.good_update: New file * test/manual/etags/crlf: New file * test/manual/etags/Makefile: Add `ctags -u` test cases
* * lib-src/emacsclient.c (print_help_and_exit): Fix --timeout.Shohei YOSHIDA2022-11-271-1/+1
|
* ; Clean up unused function: cuseridlu4nx2022-11-262-10/+0
| | | | * lib-src/ntlib.c (cuserid): Remove unused function.
* Support Racket programs in 'etags'lu4nx2022-11-231-1/+1
| | | | | | | * lib-src/ctags.c (Scheme_suffixes): Add the Racket language extension ".rkt". Copyright-paperwork-exempt: yes
* ; Fix typosStefan Kangas2022-11-231-1/+1
|
* ; Fix typosStefan Kangas2022-11-221-1/+1
|
* Fix encoding and display of messages sent by server to emacsclientEli Zaretskii2022-11-191-1/+1
| | | | | | | | | | * lisp/server.el (server-start): Use 'locale-coding-system' to encode messages sent back to the client. * lib-src/emacsclient.c (main): Print '-error' messages via 'message', not directly via 'fprintf'. This shows the error on MS-Windows when the client is invoked as 'emacsclientw', since stderr goes to the bit bucket in that case.
* Support multi-line C++11 strings in EbrowseJan Stranik2022-11-171-1/+62
| | | | | * lib-src/ebrowse.c (yylex): Support C++11 multi-line strings. (bug#58847)
* * lib-src/rcs2log: Add fallback for $TMPDIR.Stefan Kangas2022-10-191-1/+1
|
* Add gettid to seccomp-filterPhilipp Stephani2022-10-111-0/+1
| | | | | * lib-src/seccomp-filter.c (main): gettid is necessary on RHEL 9.0 (bug#56359).
* Port bwrap/allows-stdout test to Ubuntu 22.04.1Paul Eggert2022-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, Ubuntu 22.04.1 x86-64 "make check" reports a failure in test/src/emacs-tests.el’s emacs-tests/bwrap/allows-stdout. One can reproduce the bug without using the Emacs executable, by running this script: #!/bin/bash export LC_ALL=C exec strace -f -o /tmp/tr bwrap --ro-bind / / --seccomp 20 -- \ cat /dev/null 20< lib-src/seccomp-filter-exec.bpf This script exits with status 159, because "cat" didn’t get started (it got a SIGSYS signal early on). The command "journalctl -g SECCOMP" indicated that rseq (syscall 334) was the problem. This syscall is issued by /lib64/ld-linux-x86-64.so.2 before ‘main’ is called. There’s another problem with the clone3 syscall, which is used by pthread_create starting in glibc 2.34. pthread_create is called by g_child_watch_source_new, which is called by init_process_emacs. * lib-src/seccomp-filter.c (main): Allow rseq, clone3. This causes the test to pass. Perhaps a fancier, more accurate patch could be written by someone who has the time.
* Don’t truncate seccomp-filter diagnosticPaul Eggert2022-10-021-8/+5
| | | | | * lib-src/seccomp-filter.c (fail): Do not truncate diagnostic arbitrarily to 1000 bytes when ERROR is nonzero.
* Prefer static_assert to verify in seccomp-filterPaul Eggert2022-10-021-12/+11
| | | | | | | | | Prefer static_assert in just one file for now; the idea is to do it elsewhere eventually. static_assert is standard (starting with C23) whereas verify is not, and static_assert can be used even in pre-C23 files due to Gnulib’s support for it. * lib-src/seccomp-filter.c: Do not include verify.h. Prefer static_assert to verify.
* Remove hard-coded path to pwd in Makefiles.Gregory Heytings2022-09-281-4/+4
| | | | | | | | * Makefile.in: * lib-src/Makefile.in: * nextstep/Makefile.in: * nt/Makefile.in: Replace hard-coded calls to /bin/pwd by calls to 'pwd -P'. Fixes bug#58080.
* Port better to C23 bool+true+false keywordsPaul Eggert2022-09-281-1/+0
| | | | | | | | | | | | | | | | | | | | C23 is adding the C++ keywords bool, true, and false; prefer them to <stdbool.h> if they are available. * admin/merge-gnulib (GNULIB_MODULES): Add stdbool, which emulates C23 on pre-C23 platforms. (AVOIDED_MODULES): Remove stdbool; Gnulib has renamed this module to stdbool-c99 and nobody uses it so it does not need to be avoided. * m4/c-bool.m4: New file, from Gnulib stdbool module. * lib-src/seccomp-filter.c, src/conf_post.h, src/dynlib.h: * src/emacs-module.c, src/nsterm.m, src/systhread.h: * test/src/emacs-module-resources/mod-test.c: Use the C23 style and use bool without including <stdbool.h>. The Gnulib stdbool module causes config.h to include stdbool.h on pre-C23 platforms. * src/emacs-module.h.in: Don’t include <stdbool.h> if C23 or later, or if it has already been included.
* Fix several printfs for 32 bit systemsPo Lu2022-09-101-1/+1
| | | | | | | * lib-src/emacsclient.c (main): Use right length modifier when printing uintmax_t. * src/alloc.c (check_pure_size): Use right length modifier when printing ptrdiff_t.
* Display error in emacsclient if setsockopt failedStefan Kangas2022-09-091-3/+10
| | | | | * lib-src/emacsclient.c (set_tcp_socket, set_socket_timeout): Display an error message if setsockopt failed.
* ; Make emacsclient.c more quiet againStefan Kangas2022-09-071-2/+0
| | | | | * lib-src/emacsclient.c (main): Remove status message after getting a response from the server. (Bug#57650)
* ; * lib-src/emacsclient.c (main): Fix previous change.Stefan Kangas2022-09-071-2/+2
|
* Fix the MS-Windows buildEli Zaretskii2022-09-061-3/+8
| | | | | | | * lib-src/emacsclient.c (DEFAULT_TIMEOUT): Move out of the !WINDOWSNT condition, to fix the MS-Windows compilation. (set_socket_timeout) [WINDOWSNT]: Protect against too-large values of timeout.
* Add new --timeout flag to emacsclientStefan Kangas2022-09-061-3/+72
| | | | | | | | | | | | | | * lib-src/emacsclient.c (DEFAULT_TIMEOUT): New constant. (timeout): New static variable. (longopts, shortopts, decode_options, print_help_and_exit): Add new flag --timeout. (set_socket_timeout, check_socket_timeout): New helper functions. (main): Display a status message or exit after Emacs has not responded for a while, depending on above new --timeout flag. (Bug#50849) * doc/emacs/misc.texi (emacsclient Options): * doc/man/emacsclient.1: Document the above new option. * etc/NEWS: Announce it.
* * lib-src/etags.c: Remove XEmacs support.Stefan Kangas2022-08-071-8/+0
|
* Revert "Revert part of 59732a83c8 to fix bug#52969"Stefan Monnier2022-08-031-357/+3
| | | | | | | | | | | This reverts commit 460f35e96df1c39ce2ba0f424b36365a2f9e9825. Re-remove the code that scans .el files for docstrings, now that even `lisp/loaddefs.el` is compiled. * lib-src/make-docfile.c (scan_file): Don't call `scan_lisp_file`. (scan_lisp_file, skip_white, read_lisp_symbol, search_lisp_doc_at_eol): Delete functions.
* Merge from origin/emacs-28Stefan Kangas2022-07-161-0/+3
|\ | | | | | | db259d8fd3 Build Seccomp filter only if we have a 64-bit userspace (B...
| * Build Seccomp filter only if we have a 64-bit userspace (Bug#56549)Philipp Stephani2022-07-151-0/+3
| | | | | | | | | | * configure.ac (SIZEOF_LONG): New variable. * lib-src/Makefile.in (SIZEOF_LONG): New variable; added conditional.