summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Prefer C23 ckd_* to Gnulib *_WRAPV macrosPaul Eggert2023-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-05-174-22/+35
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-05-158-61/+61
|
* Work after 2038 on 32-bit GNU/LinuxPaul Eggert2023-05-141-1/+2
| | | | | | | | This adds support for 64-bit time_t on 32-bit GNU/Linux ARM and x86, where time_t was historically 32-bit. The resulting Emacs should continue to work for timestamps after mid-January 2038. * admin/merge-gnulib (GNULIB_MODULES): Add year2038. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-05-1458-153/+758
| | | | | * lib/dirent-private.h, m4/codeset.m4, m4/locale-fr.m4, m4/musl.m4: New files, from Gnulib.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-03-103-4/+33
| | | | | | | Run admin/merge-gnulib along with the following change: * admin/merge-gnulib (GNULIB_MODULES): Replace ‘time’ with ‘time-h’, adjusting to a recent renaming in Gnulib modules. Emacs doesn’t appear to need the new Gnulib ‘time’ module.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-02-255-6/+33
|
* Use Gnulib module alignasof instead of stdalignPaul Eggert2023-02-042-84/+1
| | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Replace obsolescent Gnulib module stdalign with alignasof. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/stdalign.in.h: Remove; no longer needed.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-02-0416-171/+451
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-01-133-3/+43
| | | | | | | | | This adds a new file m4/xattr.m4 from Gnulib, for NFS v4 attribute copying. Also, do these changes by hand: * configure.ac: Mention $LIB_XATTR" in ACL summary. * src/Makefile.in (QCOPY_ACL_LIB): New macro. (LIBES): Use it.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-01-0711-11/+16
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-01-0654-101/+112
|
* Merge from origin/emacs-29Eli Zaretskii2023-01-01214-232/+323
|\ | | | | | | | | | | | | | | | | | | | | 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-01214-233/+250
| |
* | Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-12-232-1/+120
| |
* | Remove Gnulib explicit_bzero modulePaul Eggert2022-12-182-39/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It’s no longer needed, as it is now merely a thin layer around C23-style memset_explicit and we might as well just call the C23 standard function; that’s more forward-looking. * admin/merge-gnulib (GNULIB_MODULES): Remove explicit_bzero, and add memset_explicit. * lib/explicit_bzero.c, m4/explicit_bzero.m4: Remove these files, which were copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/gnutls.c (gnutls_symmetric_aead): Use memset_explicit instead of explicit_bzero.
* | Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-12-185-59/+99
|/
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-11-265-158/+131
|
* Port better to C23 bool+true+false keywordsPaul Eggert2022-09-281-1/+3
| | | | | | | | | | | | | | | | | | | | 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.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-09-2842-112/+217
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-08-251-128/+54
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-08-178-343/+512
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-07-069-105/+116
| | | | * admin/merge-gnulib (AVOIDED_MODULES): Add chmod.
* Update from gnulibPaul Eggert2022-05-121-1/+0
|
* Gnulib update via admin/merge-gnulibPaul Eggert2022-05-059-11/+48
|
* Update from gnulibPaul Eggert2022-04-193-22/+45
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-04-087-18/+28
|
* Add some sleeps to gnutls_try_handshakeLars Ingebrigtsen2022-03-042-0/+208
| | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add the nanosleep module. * m4/gnulib-comp.m4 (gl_EARLY): * lib/gnulib.mk.in: Automatic update. * m4/nanosleep.m4: * lib/nanosleep.c: New module. * nt/mingw-cfg.site (gl_cv_func_free_preserves_errno): * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_nanosleep): Omit nanosleep, since mingw has it. * src/gnutls.c (gnutls_try_handshake): Add some sleeping to the busy-wait loop so that we don't use 100% CPU here (bug#32452).
* Merge from gnulibLars Ingebrigtsen2022-02-272-2/+3
| | | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): * lib/gnulib.mk.in (CXXCPP): * lib/cdefs.h: Updated with admin/merge-gnulib. (This is in preparation to adding the nanosleep module later.)
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-02-2368-356/+549
|
* Update from gnulibPaul Eggert2022-01-0444-273/+300
|
* Merge from origin/emacs-28Eli Zaretskii2022-01-01210-229/+245
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01210-229/+245
| |
* | Update from gnulibPaul Eggert2021-12-213-39/+20
| |
* | Put AM_V_GEN etc. firstPaul Eggert2021-12-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the recent changes to src/verbose.mk.in, it’s more important to be consistent about putting AM_V_GEN and similar macros at the start of a rule’s recipe, since ‘make’ now outputs the diagnostic before it executes the recipe rather than the shell outputting it. Most of the uses were already this way, but there were a few outliers. Problem reported by Pip Cet. * Makefile.in (${srcdir}/info/dir): * admin/unidata/Makefile.in (${unidir}/charprop.el, ${unifiles}) (${unidir}/emoji-labels.el): * lib/Makefile.in (libgnu.a, libegnu.a): * lisp/Makefile.in (TAGS): * src/Makefile.in (lisp.mk, Emacs): * test/Makefile.in (%.log, $(test_module)): Put AM_V_GEN and similar macros first.
* | Update from gnulibPaul Eggert2021-12-1812-717/+636
|/ | | | | Make the following changes by hand, and run ‘admin/merge-gnulib’. * configure.ac (AM_CONDITIONAL): Adjust to new Gnulib convention.
* New function num-processorsPaul Eggert2021-10-103-0/+460
| | | | | | | | | | | | | | | | | | | This addresses a FIXME comment in lisp/emacs-lisp/comp.el, relating to the number of subsidiary processes used by comp-run-async-workers in native compilation. * admin/merge-gnulib (GNULIB_MODULES): Add nproc. * doc/lispref/processes.texi (Process Information), etc/NEWS: Document num-processors. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/nproc.c, lib/nproc.h, m4/nproc.m4: New files, copied from Gnulib by admin/merge-gnulib. * lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl. (comp-effective-async-max-jobs): Use num-processors. * src/process.c: Include nproc.h. (Fnum_processors): New function. (syms_of_process): Define ‘all’, ‘current’, ‘num-processors’. * src/w32proc.c (Fw32_get_nproc): Add FIXME comment. * test/src/process-tests.el (process-num-processors): New test.
* Fix md5 issue in recent Gnulib mergePaul Eggert2021-10-052-1/+152
| | | | | | | | | | | | When configured --with-native-compilation, Emacs needs md5_stream. Problem reported by Andy Moreton (Bug#50985#23). * admin/merge-gnulib (GNULIB_MODULES): Add crypto/md5, needed for --with-native-compilation. (AVOIDED_MODULES): Avoid crypto/af_alg, since Emacs doesn’t need to bother with kernel-supported cryptography algorithms. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate by running admin/merge-gnulib. * lib/md5-stream.c: New file, copied from Gnulib.
* Unbreak the build after Gnulib updateEli Zaretskii2021-10-051-1/+1
| | | | | | | * lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from GNULIB_OVERRIDES_WINT_T. * configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define. (Bug#50985)
* Update from GnulibPaul Eggert2021-10-04174-2725/+3476
| | | | | | | | | | | | | | | | | | Make the following changes by hand, and run 'admin/merge-gnulib'. * .gitignore: Add lib/malloc/*.gl.h. * admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h directly from Gnulib, without worrying about Gnulib modules, as these files are special cases. (AVOIDED_MODULES): Remove malloc-posix. * lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4: * m4/year2038.m4: New files, copied from Gnulib. * lib/malloca.c, lib/malloca.h: * m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4: Remove. These are either no longer present in Gnulib, or are no longer needed by modules that Emacs uses. * oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first; needed for new Gnulib. * src/xmenu.c: Call emacs_abort, not abort.
* Redo emacsclient socket symlink-attack checkingPaul Eggert2021-07-232-0/+521
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add file-has-acl. * lib/file-has-acl.c: New file, copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib-src/emacsclient.c: Include acl.h, for file_has_acl. (O_PATH): Default to O_SEARCH, which is good enough here. (union local_sockaddr): New type. (socket_status): Remove, replacing with ... (connect_socket): New function. All callers changed. This function checks for ownership and permissions issues with the parent directory of the socket file, instead of checking the owner of the socket (which does not help security). (socknamesize): Move to file scope. (local_sockname): New arg S. No need to pass socknamesize. UID arg is now uid_t. All callers changed. Get file descriptor of parent directory of socket, to foil some symlink attacks. Do not follow symlinks to that directory. (set_local_socket): Create the socket here instead of on each attempt to connect it. Fall back from XDG_RUNTIME_DIR to /tmp only if the former fails due to ENOENT. Adjust permission-failure diagnostic to match changed behavior. This addresses Bug#33847, which complained about emacsclient in a safer XDG environment not connecting to an Emacs server running in a less-safe enviroment outside XDG. The patch fixes a longstanding issue with emacsclient permission checking. It’s ineffective to look at the permission of the socket file itself; on some platforms, these permissions are ignored anyway. What matters are the permissions on the parent directory of the socket file, as these are what make symlink attacks possible. Change the permissions check accordingly, and also refuse to follow symlinks to that parent directory. These changes make it OK for emacsclient to fall back from XDG_RUNTIME_DIR to the traditionally less-safe /tmp/emacsNNNN directories, since /tmp is universally sticky nowadays.
* * lib/Makefile.in (Makefile): Fix typo.Glenn Morris2021-06-091-1/+1
|
* Fix the unexec build on GNU/LinuxEli Zaretskii2021-05-191-1/+3
| | | | | | | | | | | | | The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and sheap.c. This was inadvertently disabled because a configure-time test for 'sbrk' was moved as side effect of an unrelated change. * configure.ac: Test for 'sbrk' before using the result in the decision about SYSTEM_MALLOC and HYBRID_MALLOC. (HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its replacement 'rpl_free'. * lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
* * lib/Makefile.in (maintainer-clean): Fully ignore rmdir errors.Glenn Morris2021-05-101-1/+1
|
* Base the "extraclean" Make rule on "maintainer-clean"Glenn Morris2021-05-091-1/+0
| | | | | | | | | | | | | | | | * 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 remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-03-251-1/+1
|\
| * Convert many more links to use HTTPSStefan Kangas2021-03-241-1/+1
| |
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-03-121-20/+1
|\ \ | |/
| * Simplify silent-rules build machineryGlenn Morris2021-03-061-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-01-2438-358/+1575
|\ \ | |/