1. 24 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · d494f9e8
      Paul Eggert authored
      This incorporates:
      * lib/diffseq.h, m4/inttypes.m4: Copy from Gnulib.
      * m4/gnulib-comp.m4: Regenerate.
      d494f9e8
  2. 23 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Simplify by using Gnulib sigdescr_np module · df589d36
      Paul Eggert authored
      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.
      df589d36
  3. 12 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Stop using Gnulib inttypes module · 7e3fd65b
      Paul Eggert authored
      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.
      7e3fd65b
  4. 11 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Use Gnulib inttypes module · 39c16c11
      Paul Eggert authored
      Needed for platforms like MinGW that don’t support C99 PRIdPTR.
      * admin/merge-gnulib (GNULIB_MODULES): Add inttypes.
      * m4/gnulib-comp.m4: Regenerate.
      39c16c11
  5. 06 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 33b293b4
      Paul Eggert authored
      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.
      33b293b4
  6. 30 Jul, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 5d89a9c2
      Paul Eggert authored
      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.
      5d89a9c2
  7. 09 Jul, 2020 2 commits
    • Paul Eggert's avatar
      Use Gnulib libgmp module · c8b6006d
      Paul Eggert authored
      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.
      c8b6006d
    • Paul Eggert's avatar
      Update from Gnulib · 0fc8671d
      Paul Eggert authored
      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.
      0fc8671d
  8. 28 Jun, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib. · 66501445
      Paul Eggert authored
      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.
      66501445
  9. 27 Jun, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 118c07e0
      Paul Eggert authored
      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.
      118c07e0
  10. 03 May, 2020 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 6bd47f44
      Paul Eggert authored
      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.
      6bd47f44
  11. 28 Mar, 2020 2 commits
    • Paul Eggert's avatar
      Stop using newly-deprecated dosname Gnulib module · 4f41188a
      Paul Eggert authored
      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.
      4f41188a
    • Paul Eggert's avatar
      Update from Gnulib · a775dca4
      Paul Eggert authored
      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.
      a775dca4
  12. 07 Mar, 2020 1 commit
    • Paul Eggert's avatar
      Add ‘nofollow’ flag to set-file-times · 5d4cf1fe
      Paul Eggert authored
      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).
      5d4cf1fe
  13. 24 Feb, 2020 2 commits
    • Paul Eggert's avatar
      Add 'nofollow' flag to set-file-modes etc. · 9d626dff
      Paul Eggert authored
      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.
      9d626dff
    • Paul Eggert's avatar
      Update from Gnulib · c4ca8219
      Paul Eggert authored
      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.
      c4ca8219
  14. 19 Jan, 2020 2 commits
    • Paul Eggert's avatar
      Remove Gnulib putenv code · 35a1a007
      Paul Eggert authored
      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.
      35a1a007
    • Paul Eggert's avatar
      Update from Gnulib · 52baaca1
      Paul Eggert authored
      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.
      52baaca1
  15. 14 Jan, 2020 1 commit
    • Paul Eggert's avatar
      Update from gnulib · 4fc0bc96
      Paul Eggert authored
      This incorporates:
      2020-01-10 fix major regression from 2020-01-04
      2020-01-05 tests: avoid GCC over-optimization
      2020-01-04 fix AC_CHECK_DECL so it deactivates clang's built-ins
      2020-01-03 getopt-posix: fix compilation failure in testdirs
      2020-01-03 doc: mention the 64-bit inode number problem
      2020-01-02 wchar: make the HP-UX workaround work on HP-UX 11.31
      * build-aux/config.guess, build-aux/config.sub, lib/inttypes.in.h:
      * lib/stdlib.in.h, lib/unistd.in.h, m4/00gnulib.m4, m4/largefile.m4:
      * m4/unistd_h.m4: Copy from Gnulib
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      4fc0bc96
  16. 01 Jan, 2020 2 commits
    • Paul Eggert's avatar
      Update from gnulib · 64d1b9fd
      Paul Eggert authored
      This incorporates:
      2019-12-23 mktime, nstrftime: tweak division performance
      2019-12-22 count-leading-zeros: assume 'long long'
      2019-12-22 count-one-bits: assume 'long long'
      2019-12-22 count-trailing-zeros: assume 'long long'
      2019-12-12 inttypes-incomplete: assume 'long long'
      2019-12-22 malloca: assume 'long long'
      2019-12-22 stdint: assume 'long long'
      2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
      2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
      2019-12-19 nstrftime: avoid a shadowing warning
      2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
      2019-12-12 stdalign: port to xlclang 16.01
      2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
      2019-12-08 fix compilation errors in C++ mode on Haiku
      2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
      2019-12-08 fix compilation error in C++ mode on OpenBSD
      * build-aux/config.guess, doc/misc/texinfo.tex:
      * lib/count-leading-zeros.h, lib/count-one-bits.h:
      * lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
      * lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
      * lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
      * lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
      * m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
      * m4/strtoll.m4:
      Copy from Gnulib.  Also, change copyright notices in some other
      Gnulib-copied files to exactly match Gnulib, as Gnulib updated
      them in a trivially different way.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      64d1b9fd
    • Paul Eggert's avatar
      Update copyright year to 2020 · 365e01cc
      Paul Eggert authored
      Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
      365e01cc
  17. 26 Nov, 2019 1 commit
    • Paul Eggert's avatar
      etags: remove some arbitrary limits · cffa5703
      Paul Eggert authored
      etags had undefined behavior if input files, lines, tags, etc.,
      had more than INT_MAX bytes.  Clean up the usage of integer types
      to fix the overflow errors I found.
      * admin/merge-gnulib (GNULIB_MODULES): Add mempcpy.
      * lib-src/etags.c: Include inttypes.h, intprops.h.
      (memcpyz): New function.  Use it to simplify several occurrences
      of memcpy followed by storing a trailing '\0'.
      (xnew): Use xnmalloc, to catch overflow on integer multiplication.
      (xrnew): Change last arg to multiplier.  The type is not needed.
      All callers changed.
      (node, lineno, charno, linecharno, invalidcharno, make_tag):
      (pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets)
      (readline):
      Use intmax_t for line numbers and character positions, instead of
      int or long.
      (linebuffer, make_tag, pfnote, total_size_of_entries, put_entry)
      (in_word_set, C_symtype, token, cstack, pushclass_above):
      (popclass_above, write_classname, consider_token, C_entries)
      (Ruby_functions, Makefile_targets, Lua_functions, TeX_commands)
      (TeX_decode_env, erlang_func, erlang_attribute, erlang_atom)
      (substitute, regex_tag_multiline, nocase_tail, readline_interval)
      (readline, savenstr, concat, etags_getcwd, relative_filename)
      (linebuffer_setlen):
      Use ptrdiff_t for object sizes, instead of int or long or unsigned
      or size_t.
      (write_classname, C_entries):
      Avoid sprintf, as the result could exceed INT_MAX bytes
      and then behavior goes haywire.
      (main): Use int, instead of unsigned, for argv counts.
      (get_language_from_filename): Use bool for boolean.
      (Ruby_functions): Prefer strcpy to memcpy when copying "=".
      (linebuffer_setlen): Use ‘if’ instead of ‘while’.
      (memory_full, xnmalloc, xnrealloc): New functions.
      (xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t.
      (xrealloc): Remove; no longer needed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.
      cffa5703
  18. 23 Sep, 2019 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 78669517
      Paul Eggert authored
      This incorporates:
      2019-09-22 Update some URLs
      2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC
      2019-09-15 creat: new module
      2019-09-15 access: new module
      2019-09-09 Add option to assume best, not worst, when cross-compiling.
      * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
      * lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h:
      * lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h:
      * lib/ftoastr.c, lib/get-permissions.c:
      * lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c:
      * lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h:
      * lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h:
      * lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4:
      * m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4:
      * m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4:
      * m4/gnulib-common.m4, m4/largefile.m4:
      * m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4:
      * m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4:
      * m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * m4/open-slash.m4: New file, copied from Gnulib.
      78669517
  19. 24 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Port double-slash test to z/OS · 50126f20
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add double-slash-root.
      Emacs was already using this Gnulib module indirectly, so this
      is merely noting that there is now a direct dependency.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/fileio.c (search_embedded_absfilename):
      Use DOUBLE_SLASH_IS_DISTINCT_ROOT instead of (WINDOWSNT || CYGWIN).
      Simplify.
      50126f20
  20. 25 Jun, 2019 2 commits
    • Paul Eggert's avatar
      Prefer PATH_MAX to MAXPATHLEN · 824f7841
      Paul Eggert authored
      PATH_MAX is standardized, MAXPATHLEN is not.
      Also, the Gnulib pathmax module fixes some rare bugs with PATH_MAX.
      So prefer PATH_MAX to MAXPATHLEN unless we know the latter is
      also correct (for some platform-specific code).
      * admin/merge-gnulib (GNULIB_MODULES): Add pathmax.
      This module was already present, as a dependency of canonicalize-lgpl,
      but now Emacs is using it directly.  Sort.
      * lib-src/emacsclient.c: Include stdint.h, pathmax.h.
      (get_current_dir_name): Sync to current src/sysdep.c.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/sysdep.c: Include pathmax.h.
      (get_current_dir_name_or_unreachable):
      Use PATH_MAX instead of MAXPATHLEN.
      824f7841
    • Paul Eggert's avatar
      Avoid some strlen work, primarily via strnlen · d7c68362
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add strnlen.
      * lib-src/etags.c (find_entries):
      * src/emacs.c (main):
      * src/nsmenu.m (parseKeyEquiv:):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/term.c (vfatal):
      Prefer !*X to !strlen (X).
      * lib-src/etags.c (pfnote, add_regex):
      * lib-src/pop.c (pop_open):
      * lib-src/update-game-score.c (main):
      * lwlib/lwlib.c (lw_separator_p):
      * src/doprnt.c (doprnt):
      * src/emacs.c (main):
      * src/inotify.c (inotifyevent_to_event):
      * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item):
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      * src/xdisp.c (store_mode_line_string):
      Use strnlen to avoid unnecessary work with strlen.
      * lib-src/etags.c (Prolog_functions, prolog_pr)
      (Erlang_functions, erlang_func):
      Prefer ptrdiff_t to size_t when either will do.
      (prolog_pr, erlang_func): New arg LASTLEN, to avoid
      unnecessary strlen call. All callers changed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib.
      * lwlib/lwlib.c (lw_separator_p):
      * src/json.c (json_has_prefix):
      Use strncmp to avoid unecessary work with strlen + memcmp.
      * src/process.c (set_socket_option): Use SBYTES instead of strlen.
      d7c68362
  21. 24 Jun, 2019 1 commit
    • Daniel Colascione's avatar
      Fix locating pdump by symlink · b9ac4f81
      Daniel Colascione authored
      * admin/merge-gnulib (GNULIB_MODULES): Add canonicalize-lgpl module
      * build-aux/config.guess, build-aux/gitlog-to-changelog,
      build-aux/update-copyright, lib/canonicalize-lgpl.c,
      lib/gnulib.mk.in, lib/malloca.c, lib/malloca.h, lib/pathmax.h,
      m4/canonicalize.m4, m4/double-slash-root.m4, m4/gnulib-comp.m4,
      m4/malloca.m4, my/pathmax.4: copy from GNUlib or regenerate from
      update
      * src/emacs.c: find dump by canonical path
      b9ac4f81
  22. 07 Jun, 2019 1 commit
    • Paul Eggert's avatar
      Use copy_file_range to copy files · 486a81f3
      Paul Eggert authored
      The copy_file_range syscall (introduced in Linux kernel
      version 4.5) can copy files more efficiently via server-side
      copy etc.
      * admin/merge-gnulib (GNULIB_MODULES): Add copy-file-range.
      * lib/copy-file-range.c, m4/copy-file-range.m4:
      New files, copied from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/fileio.c (Fcopy_file): Try copy_file_range first,
      falling back on read+write only if copy_file_range failed or
      if the input is empty and so could be a /proc file.
      486a81f3
  23. 29 May, 2019 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 10582d05
      Paul Eggert authored
      This incorporates:
      2019-05-24 flexmember: update comments
      2019-05-18 pthread_sigmask: fix --enable-threads=windows compilation
      2019-05-14 close-stream, closein, closeout: simplify
      2019-05-09 verify: remove verify_true
      2019-05-09 verify: support C2X and C++17 static_assert
      * build-aux/config.guess, build-aux/config.sub:
      * doc/misc/texinfo.tex, lib/flexmember.h, lib/verify.h:
      * m4/flexmember.m4, m4/pthread_sigmask.m4:
      Copy from Gnulib
      * m4/gnulib-comp.m4: Regenerate.
      
      2019-05-26  Paul Eggert  <eggert@cs.ucla.edu>
      
      Update author/maintainer info
      This mostly updates email addresses and fixes spellings of
      author and maintainer names.
      10582d05
  24. 25 Apr, 2019 2 commits
  25. 15 Apr, 2019 1 commit
    • Paul Eggert's avatar
      Replace executable’s fingerprint in place · 5c2f94a1
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add memmem-simple.
      (AVOIDED_MODULES): Add memchr.
      * configure.ac (HAVE_PDUMPER): AC_SUBST it, too, for use in makefiles.
      * lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
      * lib/fingerprint.c: New file.
      * lib/memmem.c, lib/str-two-way.h, m4/memmem.m4: New files,
      copied from Gnulib.
      * lib/fingerprint.h: Rename from src/fingerprint.h.
      * lib-src/make-fingerprint.c: Include limits.h, sys/stat.h,
      fingerprint.h, intprops.h, min-max.h.
      (SSIZE_MAX): New macro, if not already defined.
      (main): Without -r, Replace the fingerprint in the input file
      instead of generating a fingerprint.c.
      * lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * src/Makefile.in (HAVE_PDUMPER, MAKE_PDUMPER_FINGERPRINT):
      New macros.
      (temacs$(EXEEXT)): Use them to replace the fingerprint instead
      of precalculating it.
      (mostlyclean, ctagsfiles1): Do not worry about fingerprint.c.
      5c2f94a1
  26. 02 Feb, 2019 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · adc31c6b
      Paul Eggert authored
      This incorporates:
      2019-02-02 dtoastr, ftoastr, ldtoastr: port to c-strtod changes
      2019-02-01 c-strtod, c-strtold: use the bug fixes
      2019-01-30 strtold: New module
      * doc/misc/texinfo.tex, lib/ftoastr.c, lib/regexec.c, lib/stdlib.in.h:
      * m4/stdlib_h.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * m4/c-strtod.m4: Remove.
      adc31c6b
  27. 01 Jan, 2019 1 commit
  28. 03 Dec, 2018 2 commits
    • Paul Eggert's avatar
      Use tcdrain, not fdatasync, to drain ttys · f5090b91
      Paul Eggert authored
      fdatasync is for storage devices, not ttys.
      * admin/merge-gnulib (GNULIB_MODULES): Remove fdatasync.
      * lib/fdatasync.c, m4/fdatasync.m4: Remove.
      * lib-src/Makefile.in (LIB_FDATASYNC):
      * src/Makefile.in (LIB_FDATASYNC):
      Remove.  All uses removed.
      * lib-src/emacsclient.c [!DOS_NT]:
      Include <termios.h>, for tcdrain.
      * lib-src/emacsclient.c (flush_stdout):
      * src/sysdep.c (reset_sys_modes): On ttys, use tcdrain instead
      of fdatasync (except don’t use either function if DOS_NT).
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      f5090b91
    • Paul Eggert's avatar
      Update from Gnulib · 25a33aa2
      Paul Eggert authored
      This incorporates:
      2018-11-30 memrchr: port better to clang
      2018-11-21 mktime: add libc-config dependency
      * build-aux/config.guess, build-aux/config.sub, lib/memrchr.c:
      Copy from Gnulib.
      * m4/gnulib-comp.m4: Regenerate.
      25a33aa2
  29. 13 Nov, 2018 1 commit
    • Paul Eggert's avatar
      Update from Gnulib · 7e2a1543
      Paul Eggert authored
      This incorporates:
      2018-11-03 nstrftime: simplify test for mktime failure
      2018-11-02 gnulib-common.m4: port _Noreturn to C++
      2018-10-22 std-gnu11: Support Autoconf versions < 2.64
      2018-10-22 Assume Autoconf >= 2.63
      2018-10-16 Remove support for Ultrix
      2018-10-16 getloadavg: Remove support for ConvexOS
      2018-10-16 getloadavg: Remove support for Sony NEWS
      2018-10-16 Remove support for Dynix/ptx
      2018-10-16 fsusage: Remove support for AIX 3
      2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
      2018-10-16 getloadavg: Remove support for HP-UX on m68k
      2018-10-16 fsusage, mountlist: Remove support for DolphinOS
      2018-10-16 getloadavg: Remove support for Alliant FX/2800
      2018-10-16 getloadavg: Remove support for tek4300
      2018-10-16 getloadavg: Remove support for Ardent
      * build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
      * lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
      * lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
      * m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
      * m4/std-gnu11.m4, m4/stdint.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
      7e2a1543
  30. 15 Oct, 2018 1 commit
    • Paul Eggert's avatar
      Update lib/regex from glibc via Gnulib · 3d91dc1b
      Paul Eggert authored
      This syncs recent refactorings from glibc, and incorporates:
      2018-10-15 libc-config: merge from glibc
      2018-10-15 regex: depend on libc-config
      * .gitignore: Do not ignore m4/_*.m4.
      * lib/cdefs.h: New file, copied from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/libc-config.h, m4/__inline.m4: New files, copied from Gnulib.
      * lib/regcomp.c, lib/regex.c, lib/regex_internal.c:
      * lib/regex_internal.h, lib/regexec.c:
      Copy from glibc via Gnulib.
      3d91dc1b
  31. 06 Aug, 2018 1 commit
    • Paul Eggert's avatar
      Use Gnulib regex for lib-src · d904cc83
      Paul Eggert authored
      Emacs regular expressions forked from everyone else long ago.
      This makes it official and should allow simplification later.
      etags.c now uses the glibc regex API, falling back on a
      Gnulib-supplied substitute lib/regex.c if necessary.
      Emacs proper now uses its own regular expression module.
      Although this patch may look dauntingly large, most of it
      was generated automatically by admin/merge-gnulib
      and contains an exact copy of the glibc regex source,
      and the by-hand changes do not grow the Emacs source code.
      * admin/merge-gnulib (GNULIB_MODULES): Add regex.
      (AVOIDED_MODULES): Add btowc, langinfo, lock, mbrtowc, mbsinit,
      nl_langinfo, wchar, wcrtomb, wctype-h.
      * lib-src/Makefile.in (regex-emacs.o): Remove; Gnulib does it now.
      (etags_deps, etags_libs): Remove regex-emacs.o.
      * lib-src/etags.c: Go back to including regex.h.
      (add_regex): Use unsigned char translation array,
      since glibc regex requires that.
      * lib/Makefile.in (not_emacs_OBJECTS, for_emacs_OBJECTS): New macros.
      (libegnu_a_OBJECTS): Use them, to avoid building e-regex.o.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
      * lib/regex_internal.h, lib/regexec.c, m4/builtin-expect.m4:
      * m4/eealloc.m4, m4/glibc21.m4, m4/mbstate_t.m4, m4/regex.m4:
      New files, copied from Gnulib.
      * src/regex-emacs.h, src/conf_post.h:
      (RE_TRANSLATE_TYPE, RE_TRANSLATE, RE_TRANSLATE_P):
      Move from src/conf_post.h to src/regex-emacs.h,
      so that they don’t interfere with compiling lib/regex.c.
      d904cc83
  32. 02 Aug, 2018 1 commit
    • Paul Eggert's avatar
      Substitute a <ieee754.h> on hosts lacking it · d216d7d2
      Paul Eggert authored
      * .gitignore: Add lib/ieee754.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add ieee754-h.
      * configure.ac: Remove ieee754.h check, as Gnulib now does that.
      * etc/NEWS: Mention this.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/ieee754.in.h, m4/ieee754-h.m4: New files, from Gnulib.
      * src/lisp.h (IEEE_FLOATING_POINT): Now a macro so that it
      can be used in #if.
      * src/lread.c, src/print.c: Include <ieee754.h> if
      IEEE_FLOATING_POINT, not if HAVE_IEEE754_H.
      * src/lread.c (string_to_number):
      * src/print.c (float_to_string):
      Process NaNs only on IEEE hosts, and assume <ieee754.h>
      in that case.
      d216d7d2