summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/careadlinkat.h2
-rw-r--r--modules/careadlinkat1
-rw-r--r--modules/relocatable-prog-wrapper1
4 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f4db6a3b7..fc7190c20d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2020-02-23 Bruno Haible <bruno@clisp.org>
+ careadlinkat: Use 'restrict'.
+ * lib/careadlinkat.h (careadlinkat): Use 'restrict'.
+ * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT.
+ * modules/relocatable-prog-wrapper (configure.ac): Likewise.
+
regex-quote: Use 'restrict'.
* lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
* modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 584cfe9ad8..a4a37b274d 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -47,7 +47,7 @@ struct allocator;
set errno. */
char *careadlinkat (int fd, char const *filename,
- char *buffer, size_t buffer_size,
+ char *restrict buffer, size_t buffer_size,
struct allocator const *alloc,
ssize_t (*preadlinkat) (int, char const *,
char *, size_t));
diff --git a/modules/careadlinkat b/modules/careadlinkat
index 9dd7471d95..3f49aaecd7 100644
--- a/modules/careadlinkat
+++ b/modules/careadlinkat
@@ -11,6 +11,7 @@ ssize_t
unistd
configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
AC_CHECK_FUNCS_ONCE([readlinkat])
Makefile.am:
diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper
index d70d63e9e6..58af2088d5 100644
--- a/modules/relocatable-prog-wrapper
+++ b/modules/relocatable-prog-wrapper
@@ -49,6 +49,7 @@ verify
xalloc-oversized
configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
gl_FUNC_READLINK_SEPARATE
gl_CANONICALIZE_LGPL_SEPARATE
gl_MALLOCA