1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

380 Commits

Author SHA1 Message Date
Paul Eggert
0fc8671d10 Update from Gnulib
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.
2020-07-09 16:38:44 -07:00
Paul Eggert
665014452d Update from Gnulib.
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.
2020-06-28 13:24:06 -07:00
Paul Eggert
118c07e02e Update from Gnulib
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.
2020-06-27 10:07:12 -07:00
Paul Eggert
00f0ad55cd Update from gnulib
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.
2020-05-11 17:54:23 -07:00
Paul Eggert
ebfb2c4d1b Update from Gnulib
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.
2020-05-09 08:50:57 -07:00
Paul Eggert
6bd47f4477 Update from Gnulib
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.
2020-05-03 15:10:07 -07:00
Paul Eggert
4f41188a6e Stop using newly-deprecated dosname Gnulib module
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.
2020-03-28 14:08:11 -07:00
Paul Eggert
a775dca449 Update from Gnulib
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.
2020-03-28 14:08:11 -07:00
Paul Eggert
1060a6401b Update from gnulib
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.
2020-03-25 13:40:35 -07:00
Paul Eggert
5d4cf1fef8 Add ‘nofollow’ flag to set-file-times
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).
2020-03-07 12:15:43 -08:00
Paul Eggert
a3d146fd8a Update from Gnulib
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.
2020-02-24 17:55:39 -08:00
Paul Eggert
9d626dffc6 Add 'nofollow' flag to set-file-modes etc.
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.
2020-02-23 16:45:50 -08:00
Paul Eggert
c4ca8219dd Update from Gnulib
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.
2020-02-23 16:15:01 -08:00
Paul Eggert
b6be1ce644 Update from Gnulib
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.
2020-02-23 01:27:19 -08:00
Paul Eggert
c87a165040 Update from Gnulib
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.
2020-02-22 10:33:45 -08:00
Paul Eggert
5e7bead8ea Update from Gnulib
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.
2020-02-09 00:45:42 -08:00
Paul Eggert
35a1a007bb Remove Gnulib putenv code
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.
2020-01-18 20:55:09 -08:00
Paul Eggert
52baaca152 Update from Gnulib
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.
2020-01-18 20:55:09 -08:00
Paul Eggert
4fc0bc9678 Update from gnulib
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.
2020-01-13 16:27:02 -08:00
Paul Eggert
87772ffe31 Remove files no longer needed from Gnulib
* m4/count-leading-zeros.m4, m4/count-one-bits.m4:
* m4/count-trailing-zeros.m4, m4/longlong.m4:
Remove.
2019-12-31 20:18:21 -08:00
Paul Eggert
64d1b9fd8a Update from gnulib
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.
2019-12-31 19:11:56 -08:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Paul Eggert
c4cd2a0b9f Update from Gnulib
This incorporates:
2019-12-06 nstrftime: better width support for %N, %z
2019-12-03 Avoid hassles caused by [[noreturn]] in C++
2019-12-02 Fix mistakes in --enable-threads=isoc fixes from 2019-12-01
* admin/merge-gnulib (AVOIDED_MODULES): Avoid pthread-h.
* lib/_Noreturn.h, lib/nstrftime.c, m4/gnulib-common.m4:
* m4/timer_time.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-12-06 15:17:08 -08:00
Paul Eggert
cffa5703b9 etags: remove some arbitrary limits
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.
2019-11-26 13:57:00 -08:00
Paul Eggert
1b9dbca826 Update from Gnulib
This incorporates:
2019-11-24 Fix errors in C++ mode on mingw
2019-11-24 time_r: Fix for mingw (regression from 2019-11-16)
2019-11-24 sys_time: Fix errors in C++ mode on mingw
2019-11-22 intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
2019-11-21 Disable many _GL_CXXALIASWARN on non-glibc
2019-11-21 Fix various errors in _GL_CXXALIAS_SYS invocations
2019-11-19 intprops: INT_MULTIPLY_WRAPV speedup for GCC 9.3+
2019-11-18 stdint: Define [u]intptr_t correctly on 64-bit native Windows
2019-11-18 stdint: Fix value of WINT_MAX when we override wint_t
2019-11-18 stdint: Avoid "conflicting types" error on mingw 5.22
2019-11-16 time_r: Fix for mingw
2019-11-06 regex: now back in sync with glibc
* lib/intprops.h, lib/regexec.c, lib/signal.in.h:
* lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, lib/sys_select.in.h, lib/sys_time.in.h:
* lib/time.in.h, lib/unistd.in.h, m4/time_r.m4:
Copy from Gnulib.
2019-11-26 13:15:41 -08:00
Paul Eggert
78669517dc Update from Gnulib
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.
2019-09-22 23:51:44 -07:00
Paul Eggert
50126f2049 Port double-slash test to z/OS
* 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.
2019-07-24 12:11:32 -07:00
Paul Eggert
27e727fb6c Update from Gnulib
This incorporates:
2019-07-06 thread, lock, cond, tls: Remove support for Pth threads
2019-07-02 verify: document ‘assume’ better
2019-06-30 Include <stdlib.h> when needed
2019-06-30 inet_ntop, inet_pton: Avoid conflict with native Windows
* build-aux/config.sub, lib/faccessat.c, lib/fcntl.c, lib/fstatat.c:
* lib/readlinkat.c, lib/verify.h, m4/pthread_sigmask.m4:
* m4/sys_socket_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-07-06 08:54:54 -07:00
Paul Eggert
824f784187 Prefer PATH_MAX to MAXPATHLEN
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.
2019-06-25 15:56:58 -07:00
Paul Eggert
d7c6836288 Avoid some strlen work, primarily via strnlen
* 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.
2019-06-25 14:55:08 -07:00
Daniel Colascione
b9ac4f815e Fix locating pdump by symlink
* 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
2019-06-23 18:19:08 -07:00
Paul Eggert
486a81f387 Use copy_file_range to copy files
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.
2019-06-07 00:44:45 -07:00
Paul Eggert
111408a0e9 Update from Gnulib
This incorporates:
2019-06-04 copy-file-range: new module
2019-05-28 binaty-io: O_BINARY on consoles no longer fails
* doc/misc/texinfo.tex, lib/binary-io.c, lib/binary-io.h:
* lib/unistd.in.h, m4/unistd_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-06-07 00:44:45 -07:00
Paul Eggert
10582d0511 Update from Gnulib
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.
2019-05-29 16:34:57 -07:00
Paul Eggert
57a1d378ff Update from Gnulib
This incorporates:
2019-05-03 Port manywarnings to GCC 9
* m4/manywarnings.m4: Copy from Gnulib.
2019-05-03 12:17:31 -07:00
Paul Eggert
2bf957394c Improve port to platforms lacking euidaccess (Bug#35406)
* lib-src/emacsclient.c (set_local_socket):
Use faccessat with AT_EACCESS instead of using euidaccess.
* admin/merge-gnulib, lib/gnulib.mk.in, m4/gnulib-comp.m4:
Revert previous change.
2019-04-24 17:42:09 -07:00
Paul Eggert
445713f555 Port to platforms lacking euidaccess (Bug#35406)
* admin/merge-gnulib (GNULIB_MODULES): Add euidaccess.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2019-04-24 17:34:32 -07:00
Paul Eggert
5c2f94a182 Replace executable’s fingerprint in place
* 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.
2019-04-14 17:06:09 -07:00
Paul Eggert
661f44946d * m4/utimbuf.m4: Remove unused file. 2019-04-14 16:24:26 -07:00
Paul Eggert
a3c5530975 Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
2019-03-25 14:55:49 -07:00
Paul Eggert
e2f3544379 Update from Gnulib
This incorporates:
2019-03-10 alloca-opt: Fix conflict mingw's new <alloca.h> file
2019-03-03 getloadavg: Write NULL for the null pointer
Reported by Michal Privoznik <mprivozn@redhat.com>.
* lib/getloadavg.c (getloadavg): Write NULL instead of 0.
* build-aux/config.guess, build-aux/move-if-change:
* doc/misc/texinfo.tex, lib/alloca.in.h, lib/getloadavg.c:
* m4/alloca.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-03-10 23:05:30 -07:00
Paul Eggert
adc31c6bdc Update from Gnulib
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.
2019-02-02 13:15:10 -08:00
Paul Eggert
d81aa8516e Update from Gnulib
This incorporates:
2019-01-26 getloadavg: Add support for Android
2019-01-24 fchownat: Fix compilation error on Android 4.3
2019-01-24 mbtowc: Fix compilation error on Android 4.3
2019-01-24 random: Fix compilation error on Android 4.3
2019-01-24 renameat: Fix compilation error on Android 4.3
2019-01-24 unlinkat: Fix compilation error on Android 4.3
2019-01-19 gettext: support disabling use of VLAs
2019-01-17 sys_stat: Fix warning on OS/2 kLIBC
2019-01-17 fcntl: Fix syntax error (regression from 2018-10-05)
2019-01-10 verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++
2018-12-22 stdioext: port to newer 32-bit Android
2018-12-16 libc-config: Support HP-UX cc in C99 mode.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/cdefs.h, lib/fcntl.c, lib/getloadavg.c, lib/gettext.h:
* lib/regexec.c, lib/stdio-impl.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/sys_stat.in.h, lib/unistd.in.h, lib/verify.h, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2019-01-27 16:20:40 -08:00
Paul Eggert
115498702d Update from Gnulib
This incorporates mostly just copyright-year changes, plus
recent minor updates from glibc for the non-Emacs regular
expression code.
2018-12-31 18:20:07 -08:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Paul Eggert
f74595aace Update from Gnulib
This incorporates:
2018-12-16 regex: propagate fix for glibc bug 18040
2018-12-16 obstack, libc-config: Support HP-UX cc in C99 mode
2018-12-15 regex: work around a bug in glibc-2.27 and prior
2018-12-13 localtime-buffer: Avoid endless recursion
* build-aux/config.guess, build-aux/config.sub, lib/cdefs.h:
* lib/gettext.h, lib/localtime-buffer.c, lib/regexec.c, m4/regex.m4:
Copy from Gnulib.
2018-12-16 08:12:22 -08:00
Paul Eggert
f5090b9129 Use tcdrain, not fdatasync, to drain ttys
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.
2018-12-02 23:55:01 -08:00
Paul Eggert
25a33aa2d1 Update from Gnulib
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.
2018-12-02 23:55:00 -08:00
Paul Eggert
7382f64bd0 Update from glibc and Gnulib
This incorporates:
2018-11-15 mktime: DEBUG_MKTIME cleanup
2018-11-15 mktime: fix non-EOVERFLOW errno handling
2018-11-15 mktime: fix bug with Y2038 DST transition
2018-11-15 mktime: make more room for overflow
2018-11-15 mktime: simplify offset guess
2018-11-15 mktime: new test for mktime failure
2018-11-15 mktime: fix EOVERFLOW bug
2018-11-13 longlong: fix comment typo
* lib/gnulib.mk.in: Regenerate.
* lib/mktime.c, m4/longlong.m4: Copy from Gnulib.
2018-11-16 08:25:27 -08:00
Paul Eggert
7e2a154398 Update from Gnulib
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:
2018-11-13 10:59:31 -08:00
Paul Eggert
3d91dc1bb5 Update lib/regex from glibc via Gnulib
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.
2018-10-15 00:57:57 -05:00
Paul Eggert
6b8fd34c4a Update from Gnulib
This is minor refactoring that should not affect Emacs builds.
It incorporates:
2018-10-12 Make better use of Autoconf
* m4/environ.m4, m4/fsusage.m4, m4/manywarnings.m4, m4/socklen.m4:
Copy from Gnulib.
2018-10-14 22:12:46 -05:00
Paul Eggert
cf1ebfa055 Update from Gnulib
This incorporates:
2018-10-05 explicit_bzero: make it possible to namespace
2018-10-04 fcntl: make it possible to namespace
2018-10-01 mkostemp, mkostemps: fix C++ compilation on Mac OS X
2018-09-19 maint: mktime.c now shared with glibc
2018-09-18 file-has-acl: fix test failure on Cygwin 2.9
2018-09-18 gettime: nanotime never existed
* admin/merge-gnulib (AVOIDED_MODULES): Add mkdir.
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/acl_entries.c, lib/explicit_bzero.c, lib/fcntl.c:
* lib/get-permissions.c, lib/gettime.c, lib/mktime.c:
* lib/set-permissions.c, lib/stdlib.in.h, m4/acl.m4, m4/gettime.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2018-10-08 18:22:22 -07:00
Paul Eggert
fc389d3a83 Update from Gnulib
This incorporates:
2018-09-10 timespec: fix resolution confusion
2018-09-09 mktime: simplify in prep for glibc merge
2018-09-07 intprops: minor clarification of code
2018-09-06 stddef: Override max_align_t on NetBSD 8.0/x86
2018-09-06 fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku
2018-09-06 strtoll, strtoull: Rely on limits-h module
2018-09-06 limits-h: Provide numerical limits macros
2018-09-06 fcntl: Don't access nonexistent optional argument
2018-09-02 mktime: fix unlikely race+overflow bug
2018-08-31 mktime, timegm: simplify glibc time64_t
2018-08-31 mktime, timegm: simplify merge to glibc
* build-aux/config.guess, build-aux/config.sub:
* lib/dtotimespec.c, lib/fcntl.c, lib/intprops.h:
* lib/limits.in.h, lib/mktime-internal.h, lib/mktime.c:
* lib/stat-time.h, lib/strtol.c, lib/timegm.c:
* lib/timespec-add.c, lib/timespec-sub.c, lib/timespec.h:
* lib/utimens.c, m4/limits-h.m4, m4/stddef_h.m4:
Copy from Gnulib.
2018-09-10 21:22:54 -07:00
Paul Eggert
f1acdff5e0 Update from Gnulib
* build-aux/config.sub, lib/intprops.h, lib/regex_internal.c:
* lib/regex_internal.h, lib/unistd.in.h, m4/limits-h.m4:
* m4/stdint.m4, m4/unistd_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2018-08-27 19:00:14 -07:00
Paul Eggert
d904cc83f3 Use Gnulib regex for lib-src
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.
2018-08-05 19:36:09 -07:00
Paul Eggert
ba8eb994f8 Update from gnulib
This incorporates:
2018-08-05 Fix link error regarding 'rpl_environ'
* build-aux/config.guess, lib/unistd.in.h, lib/warn-on-use.h:
* m4/extern-inline.m4: Copy from Gnulib.
2018-08-05 17:40:48 -07:00
Paul Eggert
d216d7d248 Substitute a <ieee754.h> on hosts lacking it
* .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.
2018-08-01 19:01:51 -07:00
Paul Eggert
848f0f73e9 Fix floating point exceptions on Alpha (Bug#32086)
Backport from master.
* admin/merge-gnulib (GNULIB_MODULES): Add fpieee.
* m4/fpieee.m4: New file, copied from Gnulib.
* m4/gnulib-comp.m4: Regenerate.
2018-07-08 10:52:12 -07:00
Paul Eggert
0c3e283c76 Fix floating point exceptions on Alpha (Bug#32086)
* admin/merge-gnulib (GNULIB_MODULES): Add fpieee.
* m4/fpieee.m4: New file, copied from Gnulib.
* m4/gnulib-comp.m4: Regenerate.
2018-07-08 09:26:22 -07:00
Paul Eggert
891536aaad Update from Gnulib
This incorporates:
2018-07-01 getloadavg: don't redefine WINDOWS32
2018-07-01 manywarnings: omit -Wswitch-default
* build-aux/config.sub, lib/getloadavg.c, m4/manywarnings.m4:
Copy from Gnulib.
2018-07-03 23:51:31 -07:00
Paul Eggert
35e9dcab51 Update from Gnulib
This incorporates:
2018-06-29 regex: glibc does not use intprops.h
2018-06-28 regex: port to recently proposed glibc regex merge
2018-06-25 Continue to use spaces for indentation, not tabs
2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default
2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi
2018-06-24 maint: clarify comments about sticky EOF
2018-06-24 af_alg: avoid hangs when reading from streams
2018-06-17 crypto: use byteswap
2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi
2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c:
* lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c:
* lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
* lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4:
* m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4:
Copy from Gnulib.
2018-06-29 17:32:35 -07:00
Paul Eggert
79f15092b9 Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need.  Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 11:43:07 -07:00
Paul Eggert
2b9ab8c8fb Update from Gnulib
This incorporates:
2018-04-27 manywarnings: port to GCC 8.0
* build-aux/config.sub, m4/manywarnings.m4: Copy from Gnulib.
2018-04-28 16:56:48 -07:00
Paul Eggert
e9bfd114a5 Update from Gnulib
This incorporates:
2018-03-28 time_rz: fix workaround for Mac OS X 10.6 infloop
* m4/time_rz.m4: Copy from Gnulib.
2018-03-28 14:23:20 -07:00
Paul Eggert
72fad885b6 Update from Gnulib
This incorporates:
2018-03-26 time_rz: work around Mac OS X 10.6 infloop
2018-03-20 euidaccess: Port to native Windows.
* lib/euidaccess.c, lib/time_rz.c, m4/time_rz.m4: Copy from Gnulib.
2018-03-27 13:31:23 -07:00
Paul Eggert
7ce25de888 Autoupdate from Gnulib 2018-03-20 09:26:37 -07:00
Paul Eggert
630da78a3c Update from gnulib
This includes:
2018-02-18 warnings: Add support for Objective C
2018-02-03 stdlib: Fix compilation error on OpenIndiana
* lib/gnulib.mk.in: Regenerate.
* lib/stdlib.in.h, m4/getloadavg.m4, m4/stdlib_h.m4, m4/warnings.m4:
Copy from gnulib.
2018-02-20 13:45:27 -08:00
Paul Eggert
37b2f9f356 Merge from pkg-config
* m4/pkg.m4: Copy from pkg-config 0.29.2.
2018-02-11 13:10:41 -08:00
Paul Eggert
100e33979b Update from gnulib
This includes:
2018-01-31 environ: Fix link error on 64-bit Cygwin
2018-01-27 Fix malfunction of socket functions on HP-UX in 64-bit mode
2018-01-26 manywarnings: fix maintainer comment
2018-01-23 Merge strftime.c changes from glibc
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/gnulib.mk.in, lib/nstrftime.c, lib/unistd.in.h, m4/extensions.m4:
* m4/manywarnings.m4: Update.
2018-02-01 09:21:39 -08:00
Paul Eggert
7519897727 Merge from gnulib, mostly to fix copyright years 2018-01-01 01:25:56 -08:00
Paul Eggert
d263ce25cd Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 01:25:56 -08:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
220a9ecba1 Merge from Gnulib
This incorporates:
2018-01-01 maint: Run 'make update-copyright'
2017-12-29 Add cross-compilation results for GNU/Hurd.
2017-12-12 explicit_bzero: port to macOS + Clang 9.0.0
2017-12-31 17:21:33 -08:00
Paul Eggert
d20161b25e Merge from origin/emacs-26
a89f0b6f33 maint: shorten https://lists.gnu.org/archive/html/... links
8be3aee281 Merge from Gnulib
265cee553f Work around GCC bug 80776 on Fedora 27 x86
dc7a97fb84 Tweak copy-file, rename-file doc
cfa2a944d4 Change font-lock-extend-region-multiline handling in mhtml...
a8664cc998 Minor cleanup in tramp-gvfs-handle-file-local-copy
55c5b12fa0 Add test for Bug#29423 in Tramp.
3198a1646e Avoid jumbled order in HTML rendered by shr.el
23bfc2d2db Make sure 'dired-filename' property is always put by ls-lisp
f7fdaea4c0 A better solution for bug#29347
86e6ed8521 ; * src/thread.c (acquire_global_lock): Fix thinko in last...
f300852037 Avoid a hang after C-g while sit-for on a Unix TTY
d7fc719ff1 Improve the doc string of 'list-packages'
b4f67ebb92 Improve discoverability of 'defvar' for suppressing warnings
8a2b204e64 Improve discoverability of 'read-buffer-completion-ignore-...
eea4e9194c Improve documentation of self-insert-uses-region-functions
e6e41dac87 Reflect changes in copy-file and rename-file in doc strings
0ec534070f * lisp/progmodes/cc-vars.el (c-offsets-alist): Doc fix.  (...
1d0dbdff6c Reorder type predicates in ELisp manual
b081ec9dd7 Fix backward scrolling in buffers with header-line
8e40429c96 ; Fix some doc typos
ed2c542920 * lisp/bindings.el (buffer-file-coding-system): Add explic...
d82474e452 * src/fns.c (syms_of_fns) <overriding-plist-environment>: ...
292c09ff6d Fix incorrect interaction of drag/drop and double click (b...
d6fadb1d26 * lisp/menu-bar.el (menu-bar-options-save): Add display-li...
daa959efbc * lisp/menu-bar.el (menu-bar-options-save): Add global-dis...
17fc74d1b9 * lisp/follow.el (follow-mode): Restore mode line lighter....
f20c2e2f3d ; Compare process status against 127 exactly
2d203ffb7e Extract the common part of ruby-flymake-simple and ruby-fl...
09944d499a Add Rubocop Flymake backend
c65a0ae7c4 ; Fix a typo
7ab7603125 Update nt/INSTALL.W64 (Bug#28601)
11db253c08 Remove incorrect NEWS item about VC state indicator (Bug#2...
2fdc01c036 * lisp/emacs-lisp/byte-run.el (defsubst): Doc fix.
735c8b516e Make c-defun-name analyze more thoroughly a function type ...
92f0c4cd56 Avoid bogus abbreviated file names if HOME changes
8d450453fa * lisp/emacs-lisp/byte-run.el (inline): Give it a doc.
37a3b4ea40 Fix erc keep-place module with new defaults (Bug#29111)
6c312605bf Add window divider faces to NS (bug#29353)

# Conflicts:
#	etc/NEWS
#	lisp/ruler-mode.el
2017-11-25 22:55:35 -08:00
Paul Eggert
8be3aee281 Merge from Gnulib
This incorporates:
2017-11-23 stat: work around Solaris bug with tv_nsec < 0
2017-11-12 maint: shorten https://lists.gnu.org/archive/html/... links
* build-aux/config.sub, doc/misc/texinfo.tex, lib/allocator.h:
* lib/fstatat.c, lib/intprops.h, lib/lstat.c, lib/signal.in.h:
* lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/timespec.h, m4/alloca.m4, m4/extern-inline.m4:
* m4/faccessat.m4, m4/fstatat.m4, m4/gnulib-common.m4:
* m4/lstat.m4, m4/std-gnu11.m4, m4/sys_types_h.m4:
* m4/vararrays.m4:
Copy from Gnulib.
2017-11-25 22:48:09 -08:00
Paul Eggert
99ceefa8ec Merge from origin/emacs-26
79108894db Port to IBM xlc 12.01
d14956099d Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
b1573a97e1 Use alignas to fix GCALIGN-related bugs
5d68dc9a2f Change vectorlike from struct to union
6aa0a26b46 Don't enable cursor-sensor-mode in mhtml-mode
2b8ef8dddf * lisp/files.el (abbreviate-file-name): Doc fix.  (Bug#29267)
fe85ce1e16 Unbreak interactive run of a flymake test (bug#29267)
48ad00390d Fix Bug#29225
42daf83f08 CC Mode: Fix defun-open being recognized as brace-list-ope...
7775c47298 Merge from Gnulib
e470d16448 Pacify GCC when configured --with-x-toolkit=no
49450d0951 * lisp/find-dired.el (find-grep-dired): Doc fix.  (Bug#29262)
e286b3381f Fix more flymake-diag-region eob corner cases and add test...

# Conflicts:
#	src/lisp.h
2017-11-13 10:54:20 -08:00
Paul Eggert
7775c47298 Merge from Gnulib
This incorporates:
2017-11-11 faccessat: port to macOS (Bug#29231)
2017-11-05 fstatat: pacify GCC on unusual platform
* build-aux/config.guess, build-aux/config.sub:
* doc/misc/texinfo.tex, lib/faccessat.c, lib/fstatat.c:
* lib/unistd.in.h, m4/faccessat.m4, m4/unistd_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-11-11 23:12:17 -08:00
Paul Eggert
135bca574c Port file-system-info to non-Microsoft
* admin/merge-gnulib (GNULIB_MODULES): Add fsusage.
* doc/emacs/files.texi (Directories): Remove documentation of
now-obsolete directory-free-space-program and
directory-free-space-args.
* etc/NEWS: Mention change.
* etc/PROBLEMS: Slow df is no longer a problem.
* lib/fsusage.c, lib/fsusage.h, m4/fsusage.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/dired.el (dired-free-space-program)
(dired-free-space-args): These aliases are now obsolete.
* lisp/files.el (directory-free-space-program)
(directory-free-space-args): Now obsolete.
(get-free-disk-space): Just call file-system-info instead
of the now-obsolete directory-free-space-program.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_fsusage): New macro.
* src/fileio.c: Include fsusage.h.
(blocks_to_bytes, Ffile_system_info) [!DOS_NT]: New functions.
(syms_of_fileio) [!DOS_NT]: Defsubr file-system-info.
2017-10-01 22:33:20 -07:00
Paul Eggert
3ab2f9bbb9 Merge from gnulib
This incorporates:
2017-09-28 string: code style
2017-09-25 sys_types: update URL
2017-09-23 install-sh: do not assume / = //
2017-09-21 mktime: port to OpenVMS
* build-aux/install-sh, m4/mktime.m4, m4/string_h.m4:
* m4/sys_types_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2017-09-29 21:56:21 -07:00
Paul Eggert
6bbbc38b34 Merge from Gnulib
This incorporates:
2017-09-16 manywarnings: port to GCC on 64-bit MS-Windows
2017-09-13 all: Replace many more http URLs by https URLs
* build-aux/config.guess, build-aux/config.sub:
* build-aux/gitlog-to-changelog, doc/misc/texinfo.tex:
* lib/allocator.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, lib/dup2.c, lib/filevercmp.c:
* lib/fstatat.c, lib/fsync.c, lib/ftoastr.c, lib/ftoastr.h:
* lib/intprops.h, lib/signal.in.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/unistd.in.h, lib/utimens.c, m4/alloca.m4, m4/extern-inline.m4:
* m4/fstatat.m4, m4/gnulib-common.m4, m4/manywarnings.m4:
* m4/std-gnu11.m4, m4/sys_types_h.m4, m4/vararrays.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2017-09-17 13:06:54 -07:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
a0202fdc85 Merge from Gnulib
This incorporates:
2017-09-13 all: prefer https: URLs
This just changes http: to https: in comments,
in files copied from Gnulib.
2017-09-13 02:08:36 -07:00
Paul Eggert
b079ee72ac Merge from gnulib
This incorporates:
2017-09-08 stddef: Avoid conflict with system-defined max_align_t
2017-08-24 warnings: fix compilation with old autoconf
2017-08-23 glob: merge from glibc with Zanella glob changes
2017-08-17 random: Fix test compilation failure on Cygwin 1.5.25
* doc/misc/texinfo.tex, lib/flexmember.h, lib/stddef.in.h:
* lib/stdlib.in.h, m4/manywarnings.m4, m4/stdlib_h.m4:
* m4/warnings.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2017-09-10 08:40:43 -07:00
Paul Eggert
794c3cd3a2 Merge from Gnulib; use ‘open’ for O_CLOEXEC
This incorporates:
2017-08-15 renameat: ensure declaration in <stdio.h> on NetBSD
2017-08-15 extensions: enable NetBSD specific extensions
2017-08-14 open: support O_CLOEXEC
2017-08-13 reallocarray: new module
* admin/merge-gnulib (AVOIDED_MODULES): Remove ‘open’, since
it now supports O_CLOEXEC and this simplifies Emacs.
* build-aux/config.guess, lib/fcntl.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, m4/extensions.m4, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/cloexec.c, lib/cloexec.h, lib/open.c:
* m4/mode_t.m4, m4/open-cloexec.m4, m4/open.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]:
Remove, as Gnulib does this for us.
* src/filelock.c (create_lock_file):
* src/sysdep.c (emacs_open, emacs_pipe):
Don’t worry about O_CLOEXEC == 0, as Gnulib no longer sets it to 0.
2017-08-16 14:04:33 -07:00
Paul Eggert
a6ad98ad66 Improve make-temp-file performance on local files
For the motivation behind this patch, please see Bug#28023 and:
http://emacshorrors.com/posts/make-temp-name.html
Although, given the recent changes to Tramp, the related security
problem in make-temp-file is already fixed, make-temp-file still has
several unnecessary system calls.  In the typical case on GNU/Linux,
this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
getpid, unlink, umask) by 2 (open, close).
* admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
that Emacs is using it directly.
* configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (files--make-magic-temp-file): Rename from
make-temp-file.
(make-temp-file): Use make-temp-file-internal for
non-magic file names.
* src/fileio.c: Include tempname.h.
(make_temp_name_tbl, make_temp_name_count)
(make_temp_name_count_initialized_p, make_temp_name): Remove.
(Fmake_temp_file_internal): New function.
(Fmake_temp_name): Use it.
* src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
instead of make_temp_name.
2017-08-12 15:14:45 -07:00
Paul Eggert
904be8c4cf Merge from gnulib
This incorporates:
2017-08-09 tempname: do not depend on secure_getenv
2017-08-08 extensions: add _OPENBSD_SOURCE
2017-08-06 manywarnings: Add support for C++
2017-08-06 warnings, manywarnings: Add support for multiple languages
* admin/merge-gnulib: Don't use m4/manywarnings-c++.m4.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/secure_getenv.c, m4/secure_getenv.m4: Remove.
* lib/tempname.c, m4/extensions.m4, m4/manywarnings.m4, m4/warnings.m4:
Copy from gnulib.
2017-08-09 11:46:06 -07:00
Paul Eggert
b8748dd093 Merge from gnulib
This incorporates:
2017-08-04 manywarnings: port to 64-bit GCC builds of Emacs
2017-08-01 manywarnings: port to 32-bit GCC bug
* lib/gnulib.mk.in: Regenerate.
* m4/manywarnings.m4: Copy from gnulib.
2017-08-04 22:47:05 -07:00
Paul Eggert
3a8d0cc825 Avoid most stat calls when completing file names
* admin/merge-gnulib (GNULIB_MODULES): Add d-type.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/d-type.m4: New file, copied from gnulib.
* src/dired.c (DT_UNKNOWN, DT_DIR, DT_LINK)
[!HAVE_STRUCT_DIRENT_D_TYPE]: New constants.
(dirent_type): New function.
(file_name_completion): Use it, to avoid unnecessary calls to
stat-like functions on GNU/Linux and other platforms with d_type.
(file_name_completion_stat): Just follow the link; there is no
need to try first with AT_SYMLINK_NOFOLLOW since the directory
entry was already checked to exist.
2017-07-31 12:56:51 -07:00
Paul Eggert
9b971bdd34 Merge from gnulib
This incorporates:
2017-07-23 Rename module 'strftime' to 'nstrftime'
* admin/merge-gnulib (GNULIB_MODULES): Add nstrftime, remove strftime.
* build-aux/config.guess: Copy from gnulib.
* lib/nstrftime.c: Rename from lib/strftime.c.
* m4/nstrftime.m4: Rename from m4/strftime.m4.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-07-23 22:23:49 -07:00
Paul Eggert
59f6972134 Use explicit_bzero to clear GnuTLS keys
* admin/merge-gnulib (GNULIB_MODULES): Add explicit_bzero.
* lib/explicit_bzero.c, m4/explicit_bzero.m4: New files.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/gnutls.c (clear_storage): New function.
(gnutls_symmetric_aead): Use it instead of memset.
2017-07-16 16:29:12 -07:00
Paul Eggert
252444aaa3 Merge from gnulib
This incorporates:
2017-07-16 explicit_bzero: new module
2017-07-15 getdtablesize: Add minimal support for OpenVMS.
* lib/getdtablesize.c, lib/string.in.h, m4/getdtablesize.m4:
* m4/string_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2017-07-16 16:29:11 -07:00
Paul Eggert
3128d5d10e Merge from gnulib
This incorporates:
2017-07-13 Improve cross-compilation guesses for native Windows
2017-07-11 More systematic m4 quoting and indentation
2017-07-10 Make sure $host and $host_os are defined when used
2017-07-03 stdioext: Port to OpenVMS
2017-06-24 xalloc-oversized: port to icc
* doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
* lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
* m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
* m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
Copy from Gnulib.
2017-07-13 19:24:49 -07:00
Paul Eggert
f6ef15cf84 Use unlocked stdio more systematically
This can improve performance significantly on stdio-bottlenecked code.
E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
* admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
* lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
* lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
* lib-src/profile.c, lib-src/update-game-score.c:
Include unlocked-io.h instead of stdio.h, since these programs are
single-threaded.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
* src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
* src/lread.c, src/term.c:
Include sysstdio.h, possibly instead of stdio.h, to define
the unlocked functions if the system does not provide them.
* src/charset.c, src/lread.c (getc_unlocked):
Remove, since sysstdio.h now defines it if needed.
* src/cm.c (cmputc, cmcheckmagic):
* src/dispnew.c (update_frame, update_frame_with_menu)
(update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
* src/emacs.c (main, Fdump_emacs):
* src/fileio.c (Fdo_auto_save, Fset_binary_mode):
* src/image.c (slurp_file, png_read_from_file, png_load_body)
(our_stdio_fill_input_buffer):
* src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
* src/lread.c (readbyte_from_file):
* src/minibuf.c (read_minibuf_noninteractive):
* src/print.c (printchar_to_stream, strout)
(Fredirect_debugging_output):
* src/sysdep.c (reset_sys_modes, procfs_ttyname)
(procfs_get_total_memory):
* src/term.c (tty_ring_bell, tty_send_additional_strings)
(tty_set_terminal_modes, tty_reset_terminal_modes)
(tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
(tty_write_glyphs_with_face, tty_insert_glyphs)
(tty_menu_activate):
* src/xfaces.c (Fx_load_color_file):
Use unlocked stdio when it should be safe.
* src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
(fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
(fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
(putc_unlocked, putchar_unloced): Provide substitutes if not declared.
2017-06-22 11:22:53 -07:00
Philipp Stephani
d682f0daa3 Add command to replace buffer contents
Add a new command 'replace-buffer-contents' that uses the Myers diff
algorithm to non-destructively replace the accessible portion of the
current buffer.  The Myers algorithm is implemented in Gnulib.

* src/editfns.c (Freplace_buffer_contents): New command.
(set_bit, bit_is_set, buffer_chars_equal): New helper functions.
(syms_of_editfns): Define new command.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2): New unit tests.

* src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro.

* admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.
2017-06-17 15:40:58 +02:00
Paul Eggert
07ab837491 Merge from gnulib
This incorporates:
2017-06-11 getopt-posix: port to glibc 2.25.90
2017-06-04 same-inode: port better to VMS 8.2 and later
* doc/misc/texinfo.tex, lib/getopt-pfx-core.h, lib/getopt-pfx-ext.h:
* m4/sys_types_h.m4: Copy from gnulib.
2017-06-11 17:30:06 -07:00
Paul Eggert
178d0cb5f5 Improve performance by avoiding strtoumax
This made (string-to-number "10") 20% faster on my old desktop,
an AMD Phenom II X4 910e running Fedora 25 x86-64.
* admin/merge-gnulib (GNULIB_MODULES): Remove strtoumax.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, m4/strtoull.m4:
* m4/strtoumax.m4: Remove.
* src/editfns.c (str2num): New function.
(styled_format): Use it instead of strtoumax.  Use ptrdiff_t
instead of uintmax_t.  Check for integer overflow.
* src/lread.c (LEAD_INT, DOT_CHAR, TRAIL_INT, E_EXP):
Move to private scope and make them enums.
(string_to_number): Compute integer value directly during
first pass instead of revisiting it with strtoumax later.
2017-06-01 16:06:38 -07:00
Paul Eggert
2e1bebe279 Merge with gnulib, pacifying GCC 7
This incorporates:
2017-05-16 manywarnings: update for GCC 7
2017-05-15 sys_select: Avoid "was expanded before it was required"
* configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
-Wformat-overflow=2 options, due to too many false alarms.
* doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
* src/coding.c (decode_coding_iso_2022):
Fix bug uncovered by -Wimplicit-fallthrough.
* src/conf_post.h (FALLTHROUGH): New macro.
Use it to mark all switch cases that fall through.
* src/editfns.c (styled_format): Use !, not ~, on bool.
* src/gtkutil.c (xg_check_special_colors):
When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
(xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
this bug was actually caught by Clang.
* src/search.c (boyer_moore):
Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Tell GCC that glyph->u.glyphless.ch must be a character.
2017-05-16 10:27:41 -07:00