summaryrefslogtreecommitdiff
path: root/m4/gnulib-comp.m4
Commit message (Collapse)AuthorAgeFilesLines
* Work after 2038 on 32-bit GNU/LinuxPaul Eggert2023-05-141-0/+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-141-25/+30
| | | | | * 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-101-1/+1
| | | | | | | 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.
* Use Gnulib module alignasof instead of stdalignPaul Eggert2023-02-041-5/+0
| | | | | | | * 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-041-6/+12
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2023-01-131-0/+9
| | | | | | | | | 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-061-2/+0
|
* Merge from origin/emacs-29Eli Zaretskii2023-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| |
* | Remove Gnulib explicit_bzero modulePaul Eggert2022-12-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-181-3/+9
|/
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-11-261-45/+33
|
* Port better to C23 bool+true+false keywordsPaul Eggert2022-09-281-0/+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-281-1/+7
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-08-171-0/+22
|
* Add some sleeps to gnutls_try_handshakeLars Ingebrigtsen2022-03-041-0/+7
| | | | | | | | | | | | | | | | * 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).
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2022-02-231-147/+165
|
* Update from gnulibPaul Eggert2022-01-041-6/+32
|
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| |
* | Update from gnulibPaul Eggert2021-12-181-0/+39
|/ | | | | 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-101-0/+5
| | | | | | | | | | | | | | | | | | | 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-051-0/+2
| | | | | | | | | | | | 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.
* Update from GnulibPaul Eggert2021-10-041-25/+132
| | | | | | | | | | | | | | | | | | 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-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2021-01-221-0/+20
|
* Update from Gnulib by running admin/merge-gnulib.Paul Eggert2021-01-011-1/+1
|
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Revert "Import posix_spawn from Gnulib."Eli Zaretskii2020-12-251-144/+0
| | | | | | This reverts commit 3ba34141da77a24c251ee6530f3f72a366fe556e. It breaks the MinGW build and should be first tested on a branch.
* Import posix_spawn from Gnulib.Philipp Stephani2020-12-251-0/+144
| | | | | | | | | | | | | | posix_spawn is less error-prone than vfork + exec, and can make use of system-specific optimizations like `clone' on Linux. Import Gnulib replacement so that we can use recent additions like `posix_spawn_file_actions_addchdir'. The only manual change are to admin/merge-gnulib and .gitignore. All other changes are due to rerunning merge-gnulib. * admin/merge-gnulib (GNULIB_MODULES): Add posix_spawn-related modules. * .gitignore: Add new generated files.
* Update Gnulib.Paul Eggert2020-12-251-15/+17
| | | | | All changes in this commit are autogenerated by running admin/merge-gnulib.
* Update Gnulib.Philipp Stephani2020-12-241-18/+74
| | | | | All changes in this commit are autogenerated by running admin/merge-gnulib.
* Update from GnulibPaul Eggert2020-08-241-0/+1
| | | | | | This incorporates: * lib/diffseq.h, m4/inttypes.m4: Copy from Gnulib. * m4/gnulib-comp.m4: Regenerate.
* Simplify by using Gnulib sigdescr_np modulePaul Eggert2020-08-231-0/+8
| | | | | | | | | | | Inspired by a straightforward patch by Bruno Haible. * admin/merge-gnulib (GNULIB_MODULES): Add sigdescr_np. * configure.ac: Do not check for sys_siglist or __sys_siglist. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/sigdescr_np.c, m4/sigdescr_np.m4: New files, copied from Gnulib. * src/sysdep.c (sys_siglist, sys_siglist_entries): Remove. (init_signals): Do not initialize sys_siglist. (safe_strsignal): Use sigdescr_np instead of sys_siglist.
* Stop using Gnulib inttypes modulePaul Eggert2020-08-121-2/+0
| | | | | | | It wasn’t needed for MinGW after all, no other platform seems to need it, and it slows down ‘configure’. * admin/merge-gnulib (GNULIB_MODULES): Remove inttypes. * m4/gnulib-comp.m4: Regenerate.
* Use Gnulib inttypes modulePaul Eggert2020-08-111-0/+2
| | | | | | Needed for platforms like MinGW that don’t support C99 PRIdPTR. * admin/merge-gnulib (GNULIB_MODULES): Add inttypes. * m4/gnulib-comp.m4: Regenerate.
* Update from GnulibPaul Eggert2020-08-061-1/+1
| | | | | | | | | | | | | | | | This incorporates: 2020-08-06 libgmp: add <gmp/gmp.h> support 2020-08-06 Consider that clang defines __OPTIMIZE__ like GCC does 2020-08-06 Use __builtin_expect with clang everywhere 2020-08-05 Use __builtin_clz{,l,ll} with clang, also on Windows 2020-08-05 Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang 2020-07-31 _GL_CMP: Improve documentation 2020-07-30 alloca, largefile: sync with Autoconf master * lib/c++defs.h, lib/cdefs.h, lib/count-leading-zeros.h: * lib/count-trailing-zeros.h, m4/alloca.m4, m4/gnulib-common.m4: * m4/largefile.m4, m4/libgmp.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Update from GnulibPaul Eggert2020-07-301-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-07-30 work around some Oracle Studio attribute bugs 2020-07-29 fsusage, regex, stat-size: remove Cray support 2020-07-26 inttypes: remove support for AIX 4 2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0 2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS 2020-07-26 alloca: remove Cray-2 and Cray Y-MP support 2020-07-26 libgmp: remove dependency on havelib 2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP 2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11 2020-07-25 sigprocmask: small autoconf macro improvement 2020-07-25 small autoconf macro improvements 2020-07-24 timespec: remove dependence on ‘verify’ 2020-07-24 optimize a few more three-valued comparisons 2020-07-24 fix _GL_CMP parenthesization typo 2020-07-23 optimize three-valued comparison between integers 2020-07-24 doc: update for Mac OS X 10.13 2020-07-23 fchmodat, lchmod: use /proc on Cygwin 2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows 2020-07-12 libgmp: avoid warning when --without-libgmp is used 2020-07-12 libgmp: link to the correct shared library * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for * build-aux/config.guess, build-aux/config.sub: * build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c: * lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c: * lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c: * lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h: * m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4: * m4/multiarch.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/Makefile.in, test/Makefile.in (LIBGMP): Rename from LIB_GMP for compatibility with Gnulib. All uses changed.
* Use Gnulib libgmp modulePaul Eggert2020-07-091-0/+9
| | | | | | | | | | | | | | | | | | | | Instead of doing GMP by hand, use the Gnulib libgmp module. * .gitignore: Add lib/gmp.h. * admin/merge-gnulib (GNULIB_MODULES): Add libgmp. * configure.ac (GMP_LIB, GMP_OBJ): Remove. Gnulib uses the name LIB_GMP, so all uses changed. All uses of GMP_OBJ removed. (HAVE_GMP): Set this from Gnulib’s variables. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4: New files, copied from Gnulib. * src/bignum.h, test/data/emacs-module/mod-test.c: Include gmp.h unconditionally. * src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h: Remove. This moves these files from src to lib, and updates them to the current GMP version. * test/Makefile.in (GMP_H): New macro. ($(test_module)): Use it to decide whether to compile mini-gmp-gnulib.c too.
* Update from GnulibPaul Eggert2020-07-091-1/+2
| | | | | | | | | | | | | | | | | This incorporates: 2020-07-07 dup2: remove support for some very old platforms 2020-07-07 memchr: remove support for some very old platforms 2020-07-04 getumask: new module 2020-07-03 getrandom: fix compilation error on native Windows 2020-07-03 lchmod: simplify after 2020-02-22 change 2020-07-01 manywarnings: improve port to GCC 10.1 2020-06-28 getrandom: fix compilation errors on older versions of mingw 2020-06-29 alloca-opt: fix warning on mingw * lib/alloca.in.h, lib/dup2.c, lib/getrandom.c, lib/string.in.h: * lib/sys_stat.in.h, lib/unistd.in.h, m4/dup2.m4, m4/getrandom.m4: * m4/lchmod.m4, m4/manywarnings.m4, m4/string_h.m4, m4/sys_stat_h.m4: * m4/unistd_h.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Update from Gnulib.Paul Eggert2020-06-281-9/+29
| | | | | | | | | This incorporates: 2020-06-28 getrandom: do not depend on ‘open’ on mingw 2020-06-28 getrandom: fix compilation errors on older versions of mingw * build-aux/config.sub, lib/getrandom.c, m4/getrandom.m4: Copy from Gnulib * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Update from GnulibPaul Eggert2020-06-271-32/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-06-27 getloadavg: don’t depend on fopen-gnu 2020-06-25 c-dtoastr, c-ldtoastr: new modules 2020-06-01 getloadavg: fix double-increment bug 2020-06-01 tempname: use getrandom, not getentropy 2020-05-31 tempname: merge from glibc and coreutils 2020-05-31 getentropy: work around a macOS and Solaris problem 2020-05-31 fnmatch: merge from glibc 2020-05-30 unistd: remove conflicting declaration of getrandom 2020-05-30 don't assume that UNICODE is not defined 2020-05-29 fix compilation error on native Windows 2020-05-28 avoid dynamic loading of Windows API functions when possible 2020-05-28 at-internal: make more robust in multithreaded applications 2020-05-28 getloadavg: make more robust in multithreaded applications 2020-05-27 getloadavg: make more robust in multithreaded applications 2020-05-26 count-one-bits: fix MSVC specific code 2020-05-25 getentropy, getrandom: new modules 2020-05-24 open, openat: really support O_CLOEXEC 2020-05-23 verify: document ‘assume’ better 2020-05-21 regex: configure better with "clang -fsanitize=leak" 2020-05-21 memmem: configure better with "clang -fsanitize=undefined" 2020-05-19 ftoastr: fix ifndef typo * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/count-one-bits.h, lib/ftoastr.c, lib/ftoastr.h: * lib/getloadavg.c, lib/gettimeofday.c, lib/libc-config.h: * lib/open.c, lib/openat-proc.c, lib/tempname.c, lib/tempname.h: * lib/unistd.in.h, lib/verify.h, m4/memmem.m4, m4/regex.m4: * m4/unistd_h.m4: Update from Gnulib. * lib/getrandom.c, lib/sys_random.in.h: * m4/getrandom.m4, m4/sys_random_h.m4: New files, copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Update from GnulibPaul Eggert2020-05-031-0/+2
| | | | | | | | | | | | | | | | This incorporates: 2020-05-03 attribute: new module 2020-04-13 explicit_bzero: improve code style 2020-04-13 explicit_bzero: On native Windows, use SecureZeroMemory 2020-04-13 explicit_bzero: use memset_s() when available 2020-04-04 maint: remove a stray inter-word space * build-aux/config.guess, build-aux/config.sub: * build-aux/gitlog-to-changelog, build-aux/update-copyright: * doc/misc/texinfo.tex, lib/explicit_bzero.c, lib/ieee754.in.h: * lib/nstrftime.c, m4/explicit_bzero.m4, m4/gnulib-common.m4: Copy from Gnulib. * lib/attribute.h: New file, copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* Stop using newly-deprecated dosname Gnulib modulePaul Eggert2020-03-281-2/+0
| | | | | | | | | 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.
* Update from GnulibPaul Eggert2020-03-281-0/+2
| | | | | | | | | | This incorporates: 2020-03-28 Use module 'filename' instead of module 'dosname' 2020-03-28 dosname: Redirect to 'filename' * lib/at-func.c, lib/canonicalize-lgpl.c, lib/dosname.h: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/filename.h: New file, copied from Gnulib.
* Add ‘nofollow’ flag to set-file-timesPaul Eggert2020-03-071-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a companion to the recent set-file-modes patch. It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773). Like the set-file-modes patch, it needs work in the w32 port. * admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat. Remove utimens. * doc/lispref/files.texi (Changing Files): * etc/NEWS: Mention the change. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lisp/files.el (copy-directory): * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): * lisp/tar-mode.el (tar-copy): * test/lisp/filenotify-tests.el (file-notify-test03-events): * test/lisp/files-tests.el: (files-tests-file-name-non-special-set-file-times): * test/lisp/net/tramp-tests.el (tramp-test22-file-times): When setting file times, avoid following symbolic links when the file is not supposed to be a symbolic link. * lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4: New files, copied from Gnulib. * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): When creating a file that is not supposed to exist already, use the excl flag to check this. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times): * src/fileio.c (Fset_file_times): Support an optional FLAG arg. * src/fileio.c (Fcopy_file): Use futimens instead of set_file_times, as it’s simpler and is a POSIX API. * src/sysdep.c (set_file_times): Move from here ... * src/w32.c (set_file_times): ... to here, and make it static, since it is now used only in w32.c. Presumably w32.c should also add support for futimens and utimensat (the POSIX APIs, which Emacs now uses) and it can remove fdutimens (the Gnulib API, which Emacs no longer uses).
* Add 'nofollow' flag to set-file-modes etc.Paul Eggert2020-02-231-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids some race conditions (Bug#39683). E.g., if some other program changes a file to a symlink between the time Emacs creates the file and the time it changes the file’s permissions, using the new flag prevents Emacs from inadvertently changing the permissions of a victim in some completely unrelated directory. * admin/merge-gnulib (GNULIB_MODULES): Add fchmodat. * doc/lispref/files.texi (Testing Accessibility, Changing Files): * doc/lispref/os.texi (File Notifications): * etc/NEWS: Adjust documentation accordingly. * lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4: * m4/lchmod.m4: New files, copied from Gnulib. * lib/gnulib.mk.in: Regenerate. * lisp/dired-aux.el (dired-do-chmod): * lisp/doc-view.el (doc-view-make-safe-dir): * lisp/emacs-lisp/autoload.el (autoload--save-buffer): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/eshell/em-pred.el (eshell-pred-file-mode): * lisp/files.el (backup-buffer-copy, copy-directory): * lisp/gnus/mail-source.el (mail-source-movemail): * lisp/gnus/mm-decode.el (mm-display-external): * lisp/gnus/nnmail.el (nnmail-write-region): * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region): * lisp/net/tramp.el (tramp-handle-write-region) (tramp-make-tramp-temp-file): * lisp/server.el (server-ensure-safe-dir): * lisp/url/url-util.el (url-make-private-file): When getting or setting file modes, avoid following symbolic links when the file is not supposed to be a symbolic link. * lisp/doc-view.el (doc-view-make-safe-dir): Omit no-longer-needed separate symlink test. * lisp/gnus/gnus-util.el (gnus-set-file-modes): * lisp/net/tramp.el (tramp-handle-file-modes): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): * src/fileio.c (symlink_nofollow_flag): New function. (Ffile_modes, Fset_file_modes): Support an optional FLAG arg. All C callers changed. * lisp/net/ange-ftp.el (ange-ftp-set-file-modes): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * m4/gnulib-comp.m4: Regenerate.
* Update from GnulibPaul Eggert2020-02-231-0/+5
| | | | | | | | | This incorporates: 2020-02-23 use 'restrict' * lib/careadlinkat.h, lib/md5.h, lib/sha1.h, lib/sha256.h: * lib/sha512.h, lib/strftime.h, lib/string.in.h, m4/nstrftime.m4: Copy from Gnulib. * m4/gnulib-comp.m4: Regenerate.
* Remove Gnulib putenv codePaul Eggert2020-01-181-9/+0
| | | | | | | | | | It’s not needed, since Emacs always uses the system putenv and all platforms have putenv. This improves on the fix for Bug#19874. Suggested by Bruno Haible. * admin/merge-gnulib (GNULIB_MODULES): Remove putenv. * configure.ac: Remove workarounds for Gnulib putenv module. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/putenv.c, m4/putenv.m4: Remove.
* Update from GnulibPaul Eggert2020-01-181-0/+1
| | | | | | | | | | | This incorporates: 2020-01-18 Rename ~~gnulib.m4 to zzgnulib.m4 2020-01-18 Fix "m4_require: circular dependency of AC_LANG_COMPILER(C)" 2020-01-18 Ensure Automake does not drop ~~gnulib.m4 2020-01-18 Fix major regression from 2020-01-10 * m4/00gnulib.m4, m4/gnulib-common.m4: Copy from Gnulib. * m4/gnulib-comp.m4: Regenerate. * m4/zzgnulib.m4: New file, from Gnulib.