summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2021-01-232-5/+17
|
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2021-01-2237-353/+1558
|
* New file scratch_buffer_dupfree.cPaul Eggert2021-01-011-0/+41
| | | | | | | * lib/malloc/scratch_buffer_dupfree.c: New file, from Gnulib (originally from glibc 2.33 code). This is needed on macOS and some other platforms; I forgot to commit it in the most recent Gnulib update.
* Update from Gnulib by running admin/merge-gnulib.Paul Eggert2021-01-0151-340/+648
|
* Update copyright year to 2021Paul Eggert2021-01-01184-201/+217
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix issues with lib/malloc out-of-dir buildsPaul Eggert2020-12-251-3/+3
| | | | | | | | | | | | | | Problem reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2020-12/msg01626.html * configure.ac: If the scratch_buffer module is enabled, create lib/malloc and (if doing dependencies) lib/deps/malloc. * lib/Makefile.in (DEPFLAGS) [AUTO_DEPEND]: No longer any need to squash lib dependencies into a single directory. (clean): Also remove */*.o and $(DEPDIR)/*/*.d, to clean out malloc/*.o and deps/malloc/*.d. Just remove *.d files in dependencies so that rm does not complain about not being able to remove deps/malloc. (extraclean): Also remove malloc, if it is empty.
* Revert "Import posix_spawn from Gnulib."Eli Zaretskii2020-12-2518-2461/+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-2518-0/+2461
| | | | | | | | | | | | | | 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-259-99/+311
| | | | | All changes in this commit are autogenerated by running admin/merge-gnulib.
* Unbreak the build on *BSD and Macos after previous gnulib mergeLars Ingebrigtsen2020-12-241-1/+1
| | | | | | * lib/Makefile.in (DEPFLAGS): Unbreak build on BSD derivatives by writing all deps files into a single directory (instead of deps/malloc/*.c).
* Update Gnulib.Philipp Stephani2020-12-2437-509/+1835
| | | | | All changes in this commit are autogenerated by running admin/merge-gnulib.
* Ensure that Gnulib objects in subdirectories are built correctly.Philipp Stephani2020-12-241-1/+1
| | | | * lib/Makefile.in (.c.o): Add missing -o option.
* Update from GnulibPaul Eggert2020-09-053-37/+38
| | | | | | | | | | This incorporates: 2020-09-05 verify: avoid __builtin_assume 2020-08-30 strerrorname_np: New module 2020-08-26 include_next, stdint, time_rz: Change configure message * lib/gnulib.mk.in: Regenerate. * lib/string.in.h, lib/verify.h, m4/include_next.m4, m4/stdint.m4: * m4/string_h.m4, m4/time_rz.m4: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-08-251-5/+11
| | | | | | This incorporates: 2020-08-25 verify: Avoid warnings when assume(0) is used * lib/verify.h: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-08-241-44/+84
| | | | | | 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-232-0/+388
| | | | | | | | | | | 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.
* Update from GnulibPaul Eggert2020-08-236-16/+80
| | | | | | | | | | | | | | This incorporates: 2020-08-23 intprops: be consistent about +X vs X+0 2020-08-23 intprops: fix INT_MULTIPLY_WRAPV bit-field bug 2020-08-23 verify: Make assume work on bit field expressions 2020-08-23 libc-config: Improve comments 2020-08-22 verify: Do use __builtin_assume on clang 2020-08-22 sig2str: Add more signals 2020-08-21 sigdescr_np: New module * lib/cdefs.h, lib/intprops.h, lib/sig2str.c, lib/string.in.h: * lib/verify.h, m4/string_h.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
* Update from GnulibPaul Eggert2020-08-214-48/+85
| | | | | | | | | | | | This incorporates: 2020-08-20 sigabbrev_np: New module 2020-08-20 stdalign: Fix 32-bit test failures clang versions < 8 2020-08-17 careadlinkat: speedup for GCC 10 with GCC_LINT 2020-08-17 Assume autoconf >= 2.64 * build-aux/config.guess, build-aux/config.sub, lib/careadlinkat.c: * lib/stdalign.in.h, lib/string.in.h, m4/std-gnu11.m4, m4/string_h.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
* Update from GnulibPaul Eggert2020-08-172-12/+8
| | | | | | | This incorporates: 2020-08-17 verify: avoid __built_assume on Clang 2020-08-17 libc-config: avoid Clang’s __diagnose_if__ * lib/cdefs.h, lib/verify.h: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-08-1625-70/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-08-16 time_rz: remove unused functions 2020-08-16 time_rz: fix issues with mktime_z failures 2020-08-16 nstrftime: Guide inlining also on clang 2020-08-16 intprops: Avoid bogus warning on clang 2020-08-16 libc-config: Enable __REDIRECT macro also on clang 2020-08-16 regex: Use initializer shorthand syntax also with clang 2020-08-16 regex: Use space optimization also with clang 2020-08-16 Use _Static_assert and static_assert when present on clang 2020-08-16 Use 'throw ()' for optimization in C++ mode also on clang 2020-08-16 stdio: Don't break attribute 'scanf' on clang 2020-08-16 Fix "warning: 'format' attribute ...: rpl_printf" 2020-08-16 Fix "warning: attribute declaration must precede definition" 2020-08-16 Fix undesired warnings 2020-08-16 Don't use Autoconf quadrigraphsxo 2020-08-16 Fix quoting of AC_LANG_PROGRAM arguments 2020-08-16 Assume autoconf >= 2.64 2020-08-15 nstrftime: be more predictable about errno 2020-08-15 canonicalize: Fix autoconf test on MSVC/clang 2020-08-15 Support compiling without -loldnames on native Windows 2020-08-14 mktime, mktime-internal: Remove obsolete code 2020-08-14 Assume tzset exists * lib/c++defs.h, lib/canonicalize-lgpl.c, lib/cdefs.h, lib/dup2.c: * lib/fcntl.in.h, lib/getopt-cdefs.in.h, lib/intprops.h, lib/md5.h: * lib/mktime.c, lib/nstrftime.c, lib/open.c, lib/regcomp.c: * lib/regex_internal.h, lib/stdio.in.h, lib/stdlib.in.h: * lib/strftime.h, lib/string.in.h, lib/sys_select.in.h: * lib/sys_stat.in.h, lib/sys_time.in.h, lib/time.in.h, lib/time_rz.c: * lib/unistd.in.h, lib/verify.h, m4/00gnulib.m4: * m4/absolute-header.m4, m4/alloca.m4, m4/canonicalize.m4, m4/dup2.m4: * m4/fchmodat.m4, m4/fcntl.m4, m4/fdopendir.m4, m4/fpending.m4: * m4/futimens.m4, m4/getdtablesize.m4, m4/getloadavg.m4: * m4/gnulib-common.m4, m4/include_next.m4, m4/largefile.m4: * m4/manywarnings.m4, m4/mktime.m4, m4/nstrftime.m4, m4/open-slash.m4: * m4/pselect.m4, m4/pthread_sigmask.m4, m4/time_h.m4, m4/utimens.m4: * m4/utimensat.m4, m4/utimes.m4, m4/warnings.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
* Update from GnulibPaul Eggert2020-08-131-0/+4
| | | | | | | This incorporates: 2020-08-13 sys_random: Work around an uClibc bug * lib/sys_random.in.h, m4/getrandom.m4, m4/sys_random_h.m4: Copy from Gnulib.
* Stop using Gnulib inttypes modulePaul Eggert2020-08-121-1/+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.
* Update from GnulibPaul Eggert2020-08-125-17/+26
| | | | | | | | | | This incorporates: 2020-08-12 stdint: port intptr_t to more-recent MinGW 2020-08-11 Use __restrict also on clang 2020-08-11 Use flexible array syntax also on clang 2020-08-11 fcntl: On native Windows, use _setmode, not setmode * lib/binary-io.h, lib/cdefs.h, lib/fcntl.c, lib/regex.h: * lib/stdint.in.h: Copy from Gnulib.
* Use Gnulib inttypes modulePaul Eggert2020-08-111-0/+1
| | | | | | 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-1117-69/+127
| | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-08-11 Use expression statements also on clang 2020-08-10 Use many __attribute__s with clang 2020-08-09 Use attribute __aligned__ with clang 2020-08-09 Use __alignof__ with clang 2020-08-09 ignore-value: Simplify on clang 2020-08-09 Use __typeof__ with clang 2020-08-09 intprops: Fix typo in comment 2020-08-09 Silence warnings from clang 10 with -Wimplicit-fallthrough 2020-08-09 count-one-bits: Use __builtin_popcount{,l,ll} on clang 2020-08-09 string: Fix build error in C++ mode with clang 2020-08-09 Add ability to emit user-defined diagnostics with clang 2020-08-07 alloca: No need to compile alloca.c with clang 2020-08-06 Use __builtin_assume with clang * lib/alloca.in.h, lib/arg-nonnull.h, lib/c++defs.h, lib/cdefs.h: * lib/count-one-bits.h, lib/dirent.in.h, lib/ignore-value.h: * lib/intprops.h, lib/malloca.h, lib/regex_internal.h: * lib/stdalign.in.h, lib/stddef.in.h, lib/stdio.in.h: * lib/stdlib.in.h, lib/string.in.h, lib/verify.h, lib/warn-on-use.h: * m4/gnulib-common.m4, m4/stddef_h.m4, m4/stdint.m4: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-08-065-8/+17
| | | | | | | | | | | | | | | | 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.
* ; Remove */localtime-buffer.* (omitted from previous commit by accident).Paul Eggert2020-07-302-87/+0
|
* Update from GnulibPaul Eggert2020-07-3012-394/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-094-2/+4987
| | | | | | | | | | | | | | | | | | | | 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-097-93/+58
| | | | | | | | | | | | | | | | | 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-282-1/+14
| | | | | | | | | 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-2715-222/+634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-114-54/+234
| | | | | | | | | | | | | | This incorporates: 2020-05-11 careadlinkat: fix GCC 10 workaround 2020-05-10 careadlinkat: limit GCC workaround 2020-05-10 attribute: clarify list of attributes 2020-05-10 string: fix compilation error in C++ mode 2020-05-09 manywarnings: port to GCC 10.1 2020-05-09 careadlinkat: pacify -Wreturn-local-addr 2020-05-09 attribute: remove ATTRIBUTE_DEPRECATED 2020-05-09 attribute: Add comments * lib/attribute.h, lib/careadlinkat.c, lib/string.in.h: * lib/warn-on-use.h, m4/manywarnings.m4: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-05-096-25/+50
| | | | | | | | | | | | | This incorporates: 2020-05-09 stdio: don't redefine _GL_ATTRIBUTE_FORMAT 2020-05-09 dirent, stdlib, string: don't redefine _GL_ATTRIBUTE_PURE 2020-05-08 limits-h: define LONG_BIT correctly on Haiku/x86_64 2020-05-08 ignore-value tests: use module 'attribute' 2020-05-06 attribute: minor style fixes * build-aux/config.sub, doc/misc/texinfo.tex, lib/attribute.h: * lib/dirent.in.h, lib/limits.in.h, lib/stdio.in.h, lib/stdlib.in.h: * lib/string.in.h, m4/gnulib-common.m4: Copy from Gnulib.
* Update from GnulibPaul Eggert2020-05-035-12/+87
| | | | | | | | | | | | | | | | 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.
* Merge from origin/emacs-27Glenn Morris2020-04-201-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 05089a4d65 (origin/emacs-27) Tweak wording re constant variables a1040861f1 Tweak setcar-related wording 751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend... 9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor... e1d42da0d6 Fix mutability glitches reported by Drew Adams 5805df74f5 Improve mutability doc dca35b31d0 Improve mutability documentation 81e7d7f111 Document that quoting yields constants 5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu... 14a570afae Remove #' and function quoting from lambda forms in manual d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ... 4df8a61117 Add new node "Image Mode" to Emacs Manual. d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701) 5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo. eebfb72c90 Document constant vs mutable objects better 6c187ed6b0 Improve documentation of 'sort-lines' 52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta... 067b070598 ; Fix some typos and doc issues (bug#40695) # Conflicts: # etc/NEWS
| * ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-181-2/+2
| |
* | Stop using newly-deprecated dosname Gnulib modulePaul Eggert2020-03-282-28/+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.
* | Update from GnulibPaul Eggert2020-03-285-38/+123
| | | | | | | | | | | | | | | | | | | | 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.
* | Update from gnulibPaul Eggert2020-03-251-0/+8
| | | | | | | | | | | | | | This incorporates: 2020-03-25 getopt-posix: port __GETOPT_PREFIX to macOS 2020-03-22 acl-permissions: Improve autoconf macro * lib/getopt-pfx-core.h, m4/acl.m4: Copy from Gnulib.
* | Add ‘nofollow’ flag to set-file-timesPaul Eggert2020-03-073-1/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Update from GnulibPaul Eggert2020-03-071-1/+3
| | | | | | | | | | | | This incorporates: 2020-03-07 open, openat: port to (O_RDWR | O_RDONLY) != 0 * lib/open.c: Copy from Gnulib.
* | Update from GnulibPaul Eggert2020-02-241-0/+6
| | | | | | | | | | | | | | This incorporates: 2020-02-24 getloadavg: don't use /usr/local when cross-compiling on AIX 2020-02-24 fcntl: add witness of gnulib override * lib/fcntl.in.h, m4/getloadavg.m4: Copy from Gnulib.
* | Add 'nofollow' flag to set-file-modes etc.Paul Eggert2020-02-233-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-237-25/+37
| | | | | | | | | | | | | | | | | | 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.
* | Update from GnulibPaul Eggert2020-02-2310-198/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-02-22 fchmodat, lchmod: simplify 2020-02-22 lchmod: fix link error on Solaris 10 2020-02-22 use 'restrict' in all POSIX function declarations 2020-02-22 chmodat, chownat: new modules * lib/gnulib.mk.in: Regenerate. * lib/inttypes.in.h, lib/openat.h, lib/signal.in.h: * lib/stdio.in.h, lib/stdlib.in.h, lib/string.in.h: * lib/sys_stat.in.h, lib/time.in.h, lib/unistd.in.h, m4/inttypes.m4: * m4/signal_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/string_h.m4: * m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/time_h.m4: * m4/unistd_h.m4: Copy from Gnulib.
* | Update from GnulibPaul Eggert2020-02-223-0/+24
| | | | | | | | | | | | | | | | This incorporates: 2020-02-21 largefile: remove _DARWIN_USE_64_BIT_INODE 2020-02-21 Add ‘extern "C"’ to count-one-bits.h etc. * lib/count-leading-zeros.h, lib/count-one-bits.h: * lib/count-trailing-zeros.h, m4/largefile.m4: Copy from Gnulib.
* | Update from GnulibPaul Eggert2020-02-095-24/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates: 2020-02-08 lchmod: ensure declaration on HP-UX 2020-02-08 fchmodat: fix endless recursion on Cygwin 2020-02-08 Fix compilation errors in a testdir 2020-02-07 fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks 2020-02-04 Port _Noreturn to older Clang 2020-02-03 libc-config: port to Apple’s Clang variant * lib/_Noreturn.h, lib/c++defs.h, lib/libc-config.h, lib/sys_stat.in.h: * m4/gnulib-common.m4, m4/sys_stat_h.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
* | Update from GnulibPaul Eggert2020-01-272-32/+23
| | | | | | | | | | | | | | | | | | This incorporates: 2020-01-27 regex: port to non-GCC pre-IEC-60559 2020-01-24 regex: port to Gawk on nonstandard platforms 2020-01-21 regex: fix bug with >=16 subexpressions 2020-01-21 regex: simplify definition of BITSET_WORD_BITS * lib/regex.c, lib/regex_internal.h: Copy from Gnulib.
* | Remove Gnulib putenv codePaul Eggert2020-01-182-206/+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.