emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 5153dc1 1/3: Merge remote-tracking branch 'savannah/


From: Andrea Corallo
Subject: feature/native-comp 5153dc1 1/3: Merge remote-tracking branch 'savannah/master' into HEAD
Date: Sun, 23 Feb 2020 13:37:32 -0500 (EST)

branch: feature/native-comp
commit 5153dc17f2393d8fd89d2331b0e9f7ba2d925e87
Merge: 3130690 b6be1ce
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    Merge remote-tracking branch 'savannah/master' into HEAD
---
 lib/count-leading-zeros.h                |   8 +
 lib/count-one-bits.h                     |   8 +
 lib/count-trailing-zeros.h               |   8 +
 lib/gnulib.mk.in                         |   2 -
 lib/inttypes.in.h                        |  24 ++-
 lib/openat.h                             |  20 +--
 lib/signal.in.h                          |  24 ++-
 lib/stdio.in.h                           | 270 +++++++++++++++++++------------
 lib/stdlib.in.h                          |  72 ++++++---
 lib/string.in.h                          |  11 +-
 lib/sys_stat.in.h                        |  44 +++--
 lib/time.in.h                            |  17 +-
 lib/unistd.in.h                          |  24 ++-
 lisp/font-lock.el                        |   7 +-
 m4/inttypes.m4                           |   4 +-
 m4/largefile.m4                          |   3 -
 m4/signal_h.m4                           |   4 +-
 m4/stdio_h.m4                            |   4 +-
 m4/stdlib_h.m4                           |   4 +-
 m4/string_h.m4                           |   5 +-
 m4/sys_socket_h.m4                       |   4 +-
 m4/sys_stat_h.m4                         |   7 +-
 m4/time_h.m4                             |   6 +-
 m4/unistd_h.m4                           |   4 +-
 src/data.c                               |  10 +-
 src/keyboard.c                           |  13 +-
 src/lisp.h                               |   1 +
 src/xdisp.c                              |  10 --
 test/lisp/emacs-lisp/regexp-opt-tests.el |   2 +-
 29 files changed, 374 insertions(+), 246 deletions(-)

diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h
index b548754..7e88c8c 100644
--- a/lib/count-leading-zeros.h
+++ b/lib/count-leading-zeros.h
@@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN
 # define COUNT_LEADING_ZEROS_INLINE _GL_INLINE
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Assuming the GCC builtin is BUILTIN and the MSC builtin is MSC_BUILTIN,
    expand to code that computes the number of leading zeros of the local
    variable 'x' of type TYPE (an unsigned integer type) and return it
@@ -108,6 +112,10 @@ count_leading_zeros_ll (unsigned long long int x)
                        unsigned long long int);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 _GL_INLINE_HEADER_END
 
 #endif /* COUNT_LEADING_ZEROS_H */
diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h
index 78770e4..eea56d8 100644
--- a/lib/count-one-bits.h
+++ b/lib/count-one-bits.h
@@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN
 # define COUNT_ONE_BITS_INLINE _GL_INLINE
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Expand to code that computes the number of 1-bits of the local
    variable 'x' of type TYPE (an unsigned integer type) and return it
    from the current function.  */
@@ -129,6 +133,10 @@ count_one_bits_ll (unsigned long long int x)
   COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 _GL_INLINE_HEADER_END
 
 #endif /* COUNT_ONE_BITS_H */
diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h
index 2169f62..1eb5fb9 100644
--- a/lib/count-trailing-zeros.h
+++ b/lib/count-trailing-zeros.h
@@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN
 # define COUNT_TRAILING_ZEROS_INLINE _GL_INLINE
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Assuming the GCC builtin is BUILTIN and the MSC builtin is MSC_BUILTIN,
    expand to code that computes the number of trailing zeros of the local
    variable 'x' of type TYPE (an unsigned integer type) and return it
@@ -100,6 +104,10 @@ count_trailing_zeros_ll (unsigned long long int x)
                         unsigned long long int);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 _GL_INLINE_HEADER_END
 
 #endif
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 6775db0..3c01e61 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -886,7 +886,6 @@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_LCHMOD = @REPLACE_LCHMOD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
@@ -2941,7 +2940,6 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
              -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
              -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
-             -e 's|@''REPLACE_LCHMOD''@|$(REPLACE_LCHMOD)|g' \
              -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
              -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
              -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h
index d6efc7e..9f04a6c 100644
--- a/lib/inttypes.in.h
+++ b/lib/inttypes.in.h
@@ -1093,15 +1093,19 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
 #   define strtoimax rpl_strtoimax
 #  endif
 _GL_FUNCDECL_RPL (strtoimax, intmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t,
+                  (const char *restrict, char **restrict, int));
 # else
 #  if !@HAVE_DECL_STRTOIMAX@
 #   undef strtoimax
 _GL_FUNCDECL_SYS (strtoimax, intmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
+_GL_CXXALIAS_SYS (strtoimax, intmax_t,
+                  (const char *restrict, char **restrict, int));
 # endif
 _GL_CXXALIASWARN (strtoimax);
 #elif defined GNULIB_POSIXCHECK
@@ -1119,15 +1123,19 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
 #   define strtoumax rpl_strtoumax
 #  endif
 _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t,
+                  (const char *restrict, char **restrict, int));
 # else
 #  if !@HAVE_DECL_STRTOUMAX@
 #   undef strtoumax
 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t,
+                  (const char *restrict, char **restrict, int));
 # endif
 _GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/openat.h b/lib/openat.h
index 7589150..824ce56 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -52,19 +52,19 @@ _Noreturn void openat_save_fail (int);
    slightly more readable than it would be with
    fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW).  */
 
-#if GNULIB_FCHOWNAT
+#if GNULIB_CHOWNAT
 
-# ifndef FCHOWNAT_INLINE
-#  define FCHOWNAT_INLINE _GL_INLINE
+# ifndef CHOWNAT_INLINE
+#  define CHOWNAT_INLINE _GL_INLINE
 # endif
 
-FCHOWNAT_INLINE int
+CHOWNAT_INLINE int
 chownat (int fd, char const *file, uid_t owner, gid_t group)
 {
   return fchownat (fd, file, owner, group, 0);
 }
 
-FCHOWNAT_INLINE int
+CHOWNAT_INLINE int
 lchownat (int fd, char const *file, uid_t owner, gid_t group)
 {
   return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
@@ -72,19 +72,19 @@ lchownat (int fd, char const *file, uid_t owner, gid_t 
group)
 
 #endif
 
-#if GNULIB_FCHMODAT
+#if GNULIB_CHMODAT
 
-# ifndef FCHMODAT_INLINE
-#  define FCHMODAT_INLINE _GL_INLINE
+# ifndef CHMODAT_INLINE
+#  define CHMODAT_INLINE _GL_INLINE
 # endif
 
-FCHMODAT_INLINE int
+CHMODAT_INLINE int
 chmodat (int fd, char const *file, mode_t mode)
 {
   return fchmodat (fd, file, mode, 0);
 }
 
-FCHMODAT_INLINE int
+CHMODAT_INLINE int
 lchmodat (int fd, char const *file, mode_t mode)
 {
   return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 9fe9f60..c94b053 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -133,16 +133,24 @@ typedef void (*sighandler_t) (int);
 #   define pthread_sigmask rpl_pthread_sigmask
 #  endif
 _GL_FUNCDECL_RPL (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 _GL_CXXALIAS_RPL (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 # else
 #  if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask)
 _GL_FUNCDECL_SYS (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 #  endif
 _GL_CXXALIAS_SYS (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pthread_sigmask);
@@ -295,10 +303,14 @@ _GL_CXXALIASWARN (sigpending);
 #  define SIG_SETMASK 1  /* blocked_set = *set; */
 #  define SIG_UNBLOCK 2  /* blocked_set = blocked_set & ~*set; */
 _GL_FUNCDECL_SYS (sigprocmask, int,
-                  (int operation, const sigset_t *set, sigset_t *old_set));
+                  (int operation,
+                   const sigset_t *restrict set,
+                   sigset_t *restrict old_set));
 # endif
 _GL_CXXALIAS_SYS (sigprocmask, int,
-                  (int operation, const sigset_t *set, sigset_t *old_set));
+                  (int operation,
+                   const sigset_t *restrict set,
+                   sigset_t *restrict old_set));
 _GL_CXXALIASWARN (sigprocmask);
 
 /* Install the handler FUNC for signal SIG, and return the previous
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index ebcbfaf..4a95f32 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -171,17 +171,17 @@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define dprintf rpl_dprintf
 #  endif
-_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
+_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...)
                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
                                 _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
+_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...));
 # else
 #  if !@HAVE_DPRINTF@
-_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
+_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
                                 _GL_ARG_NONNULL ((2)));
 #  endif
-_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
+_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
 # endif
 _GL_CXXALIASWARN (dprintf);
 #elif defined GNULIB_POSIXCHECK
@@ -281,11 +281,14 @@ _GL_CXXALIASWARN (fgetc);
 #   undef fgets
 #   define fgets rpl_fgets
 #  endif
-_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
-                                 _GL_ARG_NONNULL ((1, 3)));
-_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
+_GL_FUNCDECL_RPL (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream)
+                  _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
+_GL_CXXALIAS_SYS (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fgets);
@@ -298,11 +301,14 @@ _GL_CXXALIASWARN (fgets);
 #   undef fopen
 #   define fopen rpl_fopen
 #  endif
-_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
-                                 _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
+_GL_FUNCDECL_RPL (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode));
 # else
-_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
+_GL_CXXALIAS_SYS (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fopen);
@@ -322,17 +328,21 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows 
platforms is not POSIX complian
 #  endif
 #  define GNULIB_overrides_fprintf 1
 #  if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  else
-_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  endif
-_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
+_GL_CXXALIAS_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
+_GL_CXXALIAS_SYS (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fprintf);
@@ -398,11 +408,14 @@ _GL_CXXALIASWARN (fputc);
 #   undef fputs
 #   define fputs rpl_fputs
 #  endif
-_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
-                              _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
+_GL_FUNCDECL_RPL (fputs, int,
+                  (const char *restrict string, FILE *restrict stream)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fputs, int,
+                  (const char *restrict string, FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
+_GL_CXXALIAS_SYS (fputs, int,
+                  (const char *restrict string, FILE *restrict stream));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fputs);
@@ -415,11 +428,17 @@ _GL_CXXALIASWARN (fputs);
 #   undef fread
 #   define fread rpl_fread
 #  endif
-_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
-                                 _GL_ARG_NONNULL ((4)));
-_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE 
*stream));
+_GL_FUNCDECL_RPL (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream)
+                  _GL_ARG_NONNULL ((4)));
+_GL_CXXALIAS_RPL (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE 
*stream));
+_GL_CXXALIAS_SYS (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fread);
@@ -433,13 +452,16 @@ _GL_CXXALIASWARN (fread);
 #   define freopen rpl_freopen
 #  endif
 _GL_FUNCDECL_RPL (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream)
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream));
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream));
 # else
 _GL_CXXALIAS_SYS (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream));
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (freopen);
@@ -458,12 +480,15 @@ _GL_WARN_ON_USE (freopen,
 #   undef fscanf
 #   define fscanf rpl_fscanf
 #  endif
-_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
-                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
-                               _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
+_GL_FUNCDECL_RPL (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
+_GL_CXXALIAS_SYS (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fscanf);
@@ -634,13 +659,16 @@ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger 
than 4 GB "
 #   define fwrite rpl_fwrite
 #  endif
 _GL_FUNCDECL_RPL (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream)
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 4)));
 _GL_CXXALIAS_RPL (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream));
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # else
 _GL_CXXALIAS_SYS (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream));
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 
 /* Work around bug 11959 when fortifying glibc 2.4 through 2.15
    <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>,
@@ -715,22 +743,26 @@ _GL_CXXALIASWARN (getchar);
 #   define getdelim rpl_getdelim
 #  endif
 _GL_FUNCDECL_RPL (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 4)));
 _GL_CXXALIAS_RPL (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream));
 # else
 #  if !@HAVE_DECL_GETDELIM@
 _GL_FUNCDECL_SYS (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 4)));
 #  endif
 _GL_CXXALIAS_SYS (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream));
 # endif
 _GL_CXXALIASWARN (getdelim);
 #elif defined GNULIB_POSIXCHECK
@@ -754,18 +786,22 @@ _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
 #   define getline rpl_getline
 #  endif
 _GL_FUNCDECL_RPL (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 3)));
 _GL_CXXALIAS_RPL (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream));
 # else
 #  if !@HAVE_DECL_GETLINE@
 _GL_FUNCDECL_SYS (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream));
 # endif
 # if @HAVE_DECL_GETLINE@
 _GL_CXXALIASWARN (getline);
@@ -909,14 +945,14 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms 
- "
 #   endif
 #   if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
 _GL_FUNCDECL_RPL_1 (__printf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
                     _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
                     _GL_ARG_NONNULL ((1)));
 #   else
 _GL_FUNCDECL_RPL_1 (__printf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
                     _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
@@ -928,14 +964,14 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char 
*format, ...));
 #    define printf rpl_printf
 #   endif
 _GL_FUNCDECL_RPL (printf, int,
-                  (const char *format, ...)
+                  (const char *restrict format, ...)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
                   _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
+_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...));
 #  endif
 #  define GNULIB_overrides_printf 1
 # else
-_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
+_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (printf);
@@ -1083,24 +1119,24 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
 #    define scanf __scanf__
 #   endif
 _GL_FUNCDECL_RPL_1 (__scanf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
                     _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
                     _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
+_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...));
 #  else
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef scanf
 #    define scanf rpl_scanf
 #   endif
-_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
+_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...)
                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
                               _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
+_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...));
 #  endif
 # else
-_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
+_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (scanf);
@@ -1113,20 +1149,24 @@ _GL_CXXALIASWARN (scanf);
 #   define snprintf rpl_snprintf
 #  endif
 _GL_FUNCDECL_RPL (snprintf, int,
-                  (char *str, size_t size, const char *format, ...)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (snprintf, int,
-                  (char *str, size_t size, const char *format, ...));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...));
 # else
 #  if !@HAVE_DECL_SNPRINTF@
 _GL_FUNCDECL_SYS (snprintf, int,
-                  (char *str, size_t size, const char *format, ...)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (snprintf, int,
-                  (char *str, size_t size, const char *format, ...));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...));
 # endif
 _GL_CXXALIASWARN (snprintf);
 #elif defined GNULIB_POSIXCHECK
@@ -1151,12 +1191,15 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define sprintf rpl_sprintf
 #  endif
-_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
+_GL_FUNCDECL_RPL (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
+_GL_CXXALIAS_SYS (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (sprintf);
@@ -1244,20 +1287,23 @@ _GL_CXXALIASWARN (vasprintf);
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define vdprintf rpl_vdprintf
 #  endif
-_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
+_GL_FUNCDECL_RPL (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args));
 # else
 #  if !@HAVE_VDPRINTF@
-_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((2)));
+_GL_FUNCDECL_SYS (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((2)));
 #  endif
 /* Need to cast, because on Solaris, the third parameter will likely be
                                                     __va_list args.  */
 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
-                       (int fd, const char *format, va_list args));
+                       (int fd, const char *restrict format, va_list args));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vdprintf);
@@ -1278,21 +1324,28 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
 #  endif
 #  define GNULIB_overrides_vfprintf 1
 #  if @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  else
-_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
-                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  endif
-_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
+_GL_CXXALIAS_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the third parameter is
                                                       __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
-                       (FILE *fp, const char *format, va_list args));
+                       (FILE *restrict fp,
+                        const char *restrict format, va_list args));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vfprintf);
@@ -1315,14 +1368,17 @@ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always 
POSIX compliant - "
 #   define vfscanf rpl_vfscanf
 #  endif
 _GL_FUNCDECL_RPL (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args)
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args)
                   _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args));
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args));
 # else
 _GL_CXXALIAS_SYS (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args));
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args));
 # endif
 _GL_CXXALIASWARN (vfscanf);
 #endif
@@ -1335,20 +1391,21 @@ _GL_CXXALIASWARN (vfscanf);
 #  endif
 #  define GNULIB_overrides_vprintf 1
 #  if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
                                 _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
                                 _GL_ARG_NONNULL ((1)));
 #  else
-_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
                                 _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
+_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the second parameter is
                                                           __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
-_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
+_GL_CXXALIAS_SYS_CAST (vprintf, int,
+                       (const char *restrict format, va_list args));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vprintf);
@@ -1370,12 +1427,12 @@ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX 
compliant - "
 #   undef vscanf
 #   define vscanf rpl_vscanf
 #  endif
-_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
+_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args)
                                _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
                                _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
+_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
 # else
-_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
+_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
 # endif
 _GL_CXXALIASWARN (vscanf);
 #endif
@@ -1386,20 +1443,24 @@ _GL_CXXALIASWARN (vscanf);
 #   define vsnprintf rpl_vsnprintf
 #  endif
 _GL_FUNCDECL_RPL (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args));
 # else
 #  if !@HAVE_DECL_VSNPRINTF@
 _GL_FUNCDECL_SYS (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args));
 # endif
 _GL_CXXALIASWARN (vsnprintf);
 #elif defined GNULIB_POSIXCHECK
@@ -1416,17 +1477,20 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
 #   define vsprintf rpl_vsprintf
 #  endif
 _GL_FUNCDECL_RPL (vsprintf, int,
-                  (char *str, const char *format, va_list args)
+                  (char *restrict str,
+                   const char *restrict format, va_list args)
                   _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vsprintf, int,
-                  (char *str, const char *format, va_list args));
+                  (char *restrict str,
+                   const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the third parameter is
                                                        __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
-                       (char *str, const char *format, va_list args));
+                       (char *restrict str,
+                        const char *restrict format, va_list args));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vsprintf);
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 49bbf6f..ec5f124 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -311,13 +311,17 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant 
everywhere - "
 #   undef mbtowc
 #   define mbtowc rpl_mbtowc
 #  endif
-_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
-_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_FUNCDECL_RPL (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
+_GL_CXXALIAS_RPL (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
 # else
 #  if !@HAVE_MBTOWC@
-_GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_FUNCDECL_SYS (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
 #  endif
-_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_CXXALIAS_SYS (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbtowc);
@@ -866,15 +870,19 @@ _GL_WARN_ON_USE (reallocarray, "reallocarray is not 
portable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define realpath rpl_realpath
 #  endif
-_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
-                                    _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
+_GL_FUNCDECL_RPL (realpath, char *,
+                  (const char *restrict name, char *restrict resolved)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (realpath, char *,
+                  (const char *restrict name, char *restrict resolved));
 # else
 #  if !@HAVE_REALPATH@
-_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
-                                    _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (realpath, char *,
+                  (const char *restrict name, char *restrict resolved)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
+_GL_CXXALIAS_SYS (realpath, char *,
+                  (const char *restrict name, char *restrict resolved));
 # endif
 _GL_CXXALIASWARN (realpath);
 #elif defined GNULIB_POSIXCHECK
@@ -957,15 +965,19 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
 #   define strtod rpl_strtod
 #  endif
 #  define GNULIB_defined_strtod_function 1
-_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
-                                  _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
+_GL_FUNCDECL_RPL (strtod, double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtod, double,
+                  (const char *restrict str, char **restrict endp));
 # else
 #  if !@HAVE_STRTOD@
-_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
-                                  _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (strtod, double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
+_GL_CXXALIAS_SYS (strtod, double,
+                  (const char *restrict str, char **restrict endp));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtod);
@@ -985,15 +997,19 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
 #   define strtold rpl_strtold
 #  endif
 #  define GNULIB_defined_strtold_function 1
-_GL_FUNCDECL_RPL (strtold, long double, (const char *str, char **endp)
-                                        _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtold, long double, (const char *str, char **endp));
+_GL_FUNCDECL_RPL (strtold, long double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtold, long double,
+                  (const char *restrict str, char **restrict endp));
 # else
 #  if !@HAVE_STRTOLD@
-_GL_FUNCDECL_SYS (strtold, long double, (const char *str, char **endp)
-                                        _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (strtold, long double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtold, long double, (const char *str, char **endp));
+_GL_CXXALIAS_SYS (strtold, long double,
+                  (const char *restrict str, char **restrict endp));
 # endif
 _GL_CXXALIASWARN (strtold);
 #elif defined GNULIB_POSIXCHECK
@@ -1015,11 +1031,13 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - "
    to ERANGE.  */
 # if !@HAVE_STRTOLL@
 _GL_FUNCDECL_SYS (strtoll, long long,
-                  (const char *string, char **endptr, int base)
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
                   _GL_ARG_NONNULL ((1)));
 # endif
 _GL_CXXALIAS_SYS (strtoll, long long,
-                  (const char *string, char **endptr, int base));
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
 _GL_CXXALIASWARN (strtoll);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoll
@@ -1040,11 +1058,13 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
    ERANGE.  */
 # if !@HAVE_STRTOULL@
 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
-                  (const char *string, char **endptr, int base)
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
                   _GL_ARG_NONNULL ((1)));
 # endif
 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
-                  (const char *string, char **endptr, int base));
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
 _GL_CXXALIASWARN (strtoull);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoull
diff --git a/lib/string.in.h b/lib/string.in.h
index 2c04e5f..5bc0084 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -411,11 +411,14 @@ _GL_WARN_ON_USE (strdup, "strdup is unportable - "
 #   undef strncat
 #   define strncat rpl_strncat
 #  endif
-_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
-                                   _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
+_GL_FUNCDECL_RPL (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n));
 # else
-_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
+_GL_CXXALIAS_SYS (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n));
 # endif
 # if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strncat);
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index e3ab315..4494607 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -455,18 +455,22 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - 
"
 #   define fstatat rpl_fstatat
 #  endif
 _GL_FUNCDECL_RPL (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags)
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags));
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags));
 # else
 #  if !@HAVE_FSTATAT@
 _GL_FUNCDECL_SYS (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags)
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags)
                   _GL_ARG_NONNULL ((2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags));
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags));
 # endif
 _GL_CXXALIASWARN (fstatat);
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
@@ -514,23 +518,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
 #if @GNULIB_LCHMOD@
 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
    denotes a symbolic link.  */
-# if @REPLACE_LCHMOD@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   undef lchmod
-#   define lchmod rpl_lchmod
-#  endif
-_GL_FUNCDECL_RPL (lchmod, int,
-                  (char const *filename, mode_t mode)
-                  _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (lchmod, int,
-                  (char const *filename, mode_t mode));
-# else
-#  if !@HAVE_LCHMOD@ || defined __hpux
+# if !@HAVE_LCHMOD@ || defined __hpux
 _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
                                _GL_ARG_NONNULL ((1)));
-#  endif
-_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 # endif
+_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 _GL_CXXALIASWARN (lchmod);
 #elif defined GNULIB_POSIXCHECK
 # undef lchmod
@@ -548,17 +540,21 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define lstat stat
 #  endif
-_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
+_GL_CXXALIAS_RPL_1 (lstat, stat, int,
+                    (const char *restrict name, struct stat *restrict buf));
 # elif @REPLACE_LSTAT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef lstat
 #   define lstat rpl_lstat
 #  endif
-_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
-                              _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
+_GL_FUNCDECL_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
 # else
-_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
+_GL_CXXALIAS_SYS (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
 # endif
 # if @HAVE_LSTAT@
 _GL_CXXALIASWARN (lstat);
@@ -771,7 +767,7 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
 #    define stat(name, st) rpl_stat (name, st)
 #   endif /* !_LARGE_FILES */
 #  endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */
-_GL_EXTERN_C int stat (const char *name, struct stat *buf)
+_GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf)
                       _GL_ARG_NONNULL ((1, 2));
 # endif
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
diff --git a/lib/time.in.h b/lib/time.in.h
index 3f942b7..1d11650 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -286,14 +286,17 @@ _GL_CXXALIASWARN (ctime);
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    define strftime rpl_strftime
 #   endif
-_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm *__tp)
-                                    _GL_ARG_NONNULL ((1, 3, 4)));
-_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm 
*__tp));
+_GL_FUNCDECL_RPL (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict __tp)
+                  _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_CXXALIAS_RPL (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict 
__tp));
 #  else
-_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm 
*__tp));
+_GL_CXXALIAS_SYS (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict 
__tp));
 #  endif
 #  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strftime);
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index d6176ad..c9b9ac9 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1370,18 +1370,22 @@ _GL_CXXALIASWARN (read);
 #   define readlink rpl_readlink
 #  endif
 _GL_FUNCDECL_RPL (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize)
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize));
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize));
 # else
 #  if !@HAVE_READLINK@
 _GL_FUNCDECL_SYS (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize)
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize));
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize));
 # endif
 _GL_CXXALIASWARN (readlink);
 #elif defined GNULIB_POSIXCHECK
@@ -1399,18 +1403,22 @@ _GL_WARN_ON_USE (readlink, "readlink is unportable - "
 #   define readlinkat rpl_readlinkat
 #  endif
 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len)
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len));
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len));
 # else
 #  if !@HAVE_READLINKAT@
 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len)
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len)
                   _GL_ARG_NONNULL ((2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len));
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len));
 # endif
 _GL_CXXALIASWARN (readlinkat);
 #elif defined GNULIB_POSIXCHECK
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 506c888..e0955b7 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1120,9 +1120,10 @@ locking for a mode, and is not meant to be called from 
lisp functions."
   "Make sure the region BEG...END has been fontified.
 If the region is not specified, it defaults to the entire accessible
 portion of the buffer."
-  (font-lock-set-defaults)
-  (funcall font-lock-ensure-function
-           (or beg (point-min)) (or end (point-max))))
+  (when (font-lock-specified-p t)
+    (font-lock-set-defaults)
+    (funcall font-lock-ensure-function
+             (or beg (point-min)) (or end (point-max)))))
 
 (defun font-lock-default-fontify-buffer ()
   "Fontify the whole buffer using `font-lock-fontify-region-function'."
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index d0487d6..224d0cd 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 28
+# inttypes.m4 serial 29
 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,6 +28,8 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
     ]], [imaxabs imaxdiv strtoimax strtoumax])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 # Ensure that the PRI* and SCN* macros are defined appropriately.
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index e381339..8017ca7 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -113,9 +113,6 @@ if test "$enable_largefile" != no; then
       [Define for large files, on AIX-style hosts.],
       [_AC_SYS_LARGEFILE_TEST_INCLUDES])
   fi
-
-  AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
-    [Enable large inode numbers on Mac OS X 10.5.])
 fi
 ])# AC_SYS_LARGEFILE
 ])# m4_version_prereq 2.70
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 0868438..b262980 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,4 +1,4 @@
-# signal_h.m4 serial 18
+# signal_h.m4 serial 19
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,8 @@ AC_DEFUN([gl_SIGNAL_H],
     ]], [pthread_sigmask sigaction
     sigaddset sigdelset sigemptyset sigfillset sigismember
     sigpending sigprocmask])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index c603b51..5f968bc 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 49
+# stdio_h.m4 serial 50
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -107,6 +107,8 @@ AC_DEFUN([gl_STDIO_H],
   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
     ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
     renameat snprintf tmpfile vdprintf vsnprintf])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 61a3e31..743066a 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 48
+# stdlib_h.m4 serial 49
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,6 +27,8 @@ AC_DEFUN([gl_STDLIB_H],
     posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
     realpath rpmatch secure_getenv setenv setstate setstate_r srandom
     srandom_r strtod strtold strtoll strtoull unlockpt unsetenv])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 4c1f685..cc51337 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 22
+# serial 23
 
 # Written by Paul Eggert.
 
@@ -18,7 +18,6 @@ AC_DEFUN([gl_HEADER_STRING_H],
 
 AC_DEFUN([gl_HEADER_STRING_H_BODY],
 [
-  AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   gl_NEXT_HEADERS([string.h])
 
@@ -30,6 +29,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
     [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
      strerror_r strsignal strverscmp])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 1471aea..bf902f0 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 24
+# sys_socket_h.m4 serial 25
 dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -95,6 +95,8 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
 #include <sys/socket.h>
     ]], [socket connect accept bind getpeername getsockname getsockopt
     listen recv send recvfrom sendto setsockopt shutdown accept4])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index a5f35d4..3efba5a 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 32   -*- Autoconf -*-
+# sys_stat_h.m4 serial 33   -*- Autoconf -*-
 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -48,7 +48,9 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
   gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
     ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
     mknod mknodat stat utimensat])
-]) # gl_HEADER_SYS_STAT_H
+
+  AC_REQUIRE([AC_C_RESTRICT])
+])
 
 AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
 [
@@ -92,7 +94,6 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
   REPLACE_FSTAT=0;      AC_SUBST([REPLACE_FSTAT])
   REPLACE_FSTATAT=0;    AC_SUBST([REPLACE_FSTATAT])
   REPLACE_FUTIMENS=0;   AC_SUBST([REPLACE_FUTIMENS])
-  REPLACE_LCHMOD=0;     AC_SUBST([REPLACE_LCHMOD])
   REPLACE_LSTAT=0;      AC_SUBST([REPLACE_LSTAT])
   REPLACE_MKDIR=0;      AC_SUBST([REPLACE_MKDIR])
   REPLACE_MKFIFO=0;     AC_SUBST([REPLACE_MKFIFO])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index aae0ae2..d0f8932 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
 
-# serial 11
+# serial 12
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -19,10 +19,12 @@ AC_DEFUN([gl_HEADER_TIME_H],
 
 AC_DEFUN([gl_HEADER_TIME_H_BODY],
 [
-  AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+
   gl_NEXT_HEADERS([time.h])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 dnl Check whether 'struct timespec' is declared
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index ea2bb01..e776f3b 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 77
+# unistd_h.m4 serial 78
 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -48,6 +48,8 @@ AC_DEFUN([gl_UNISTD_H],
     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
     readlink readlinkat rmdir sethostname sleep symlink symlinkat
     truncate ttyname_r unlink unlinkat usleep])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
diff --git a/src/data.c b/src/data.c
index 7e3400e..8a0546c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -143,15 +143,9 @@ wrong_length_argument (Lisp_Object a1, Lisp_Object a2, 
Lisp_Object a3)
 }
 
 AVOID
-wrong_type_argument (register Lisp_Object predicate, register Lisp_Object 
value)
+wrong_type_argument (Lisp_Object predicate, Lisp_Object value)
 {
-  /* If VALUE is not even a valid Lisp object, we'd want to abort here
-     where we can get a backtrace showing where it came from.  We used
-     to try and do that by checking the tagbits, but nowadays all
-     tagbits are potentially valid.  */
-  /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit)
-   *   emacs_abort (); */
-
+  eassert (!TAGGEDP (value, Lisp_Type_Unused0));
   xsignal2 (Qwrong_type_argument, predicate, value);
 }
 
diff --git a/src/keyboard.c b/src/keyboard.c
index 913a4d3..9ce168c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5998,20 +5998,13 @@ make_lispy_event (struct input_event *event)
       return list2 (Qselect_window, list1 (event->frame_or_window));
 
     case TAB_BAR_EVENT:
-      if (EQ (event->arg, event->frame_or_window))
-       /* This is the prefix key.  We translate this to
-          `(tab_bar)' because the code in keyboard.c for tab bar
-          events, which we use, relies on this.  */
-       return list1 (Qtab_bar);
-      else if (SYMBOLP (event->arg))
-       return apply_modifiers (event->modifiers, event->arg);
-      return event->arg;
-
     case TOOL_BAR_EVENT:
       {
        Lisp_Object res = event->arg;
+       Lisp_Object location
+         = event->kind == TAB_BAR_EVENT ? Qtab_bar : Qtool_bar;
        if (SYMBOLP (res)) res = apply_modifiers (event->modifiers, res);
-       return list2 (res, list2 (event->frame_or_window, Qtool_bar));
+       return list2 (res, list2 (event->frame_or_window, location));
       }
 
     case USER_SIGNAL_EVENT:
diff --git a/src/lisp.h b/src/lisp.h
index 3ee6187..cd543f5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -481,6 +481,7 @@ enum Lisp_Type
     Lisp_Symbol = 0,
 
     /* Type 1 is currently unused.  */
+    Lisp_Type_Unused0 = 1,
 
     /* Fixnum.  XFIXNUM (obj) is the integer value.  */
     Lisp_Int0 = 2,
diff --git a/src/xdisp.c b/src/xdisp.c
index 682399f..c2aa314 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13358,11 +13358,6 @@ handle_tab_bar_click (struct frame *f, int x, int y, 
bool down_p,
       XSETFRAME (frame, f);
       event.kind = TAB_BAR_EVENT;
       event.frame_or_window = frame;
-      event.arg = frame;
-      kbd_buffer_store_event (&event);
-
-      event.kind = TAB_BAR_EVENT;
-      event.frame_or_window = frame;
       event.arg = key;
       event.modifiers = close_p ? ctrl_modifier | modifiers : modifiers;
       kbd_buffer_store_event (&event);
@@ -13538,11 +13533,6 @@ tty_handle_tab_bar_click (struct frame *f, int x, int 
y, bool down_p,
       XSETFRAME (frame, f);
       event->kind = TAB_BAR_EVENT;
       event->frame_or_window = frame;
-      event->arg = frame;
-      kbd_buffer_store_event (event);
-
-      event->kind = TAB_BAR_EVENT;
-      event->frame_or_window = frame;
       event->arg = key;
       if (close_p)
        event->modifiers |= ctrl_modifier;
diff --git a/test/lisp/emacs-lisp/regexp-opt-tests.el 
b/test/lisp/emacs-lisp/regexp-opt-tests.el
index 2d316b5..ff93b8b 100644
--- a/test/lisp/emacs-lisp/regexp-opt-tests.el
+++ b/test/lisp/emacs-lisp/regexp-opt-tests.el
@@ -30,7 +30,7 @@
   (if (cdr l)
       (mapcan (lambda (x)
                 (mapcar (lambda (p) (cons x p))
-                        (perm (remove x l))))
+                        (regexp-opt-test--permutations (remove x l))))
               l)
     (list l)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]