]> Savannah Git Hosting - gnulib.git/commitdiff
amemxfrm: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:04:46 +0000 (12:04 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:04:46 +0000 (12:04 +0100)
* lib/amemxfrm.h (amemxfrm): Use 'restrict'.
* modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.

ChangeLog
lib/amemxfrm.h
modules/amemxfrm

index c21e04d00e74b14b38b080aa3a3cd93a9c82769a..563d7709f1fbcdec2ea3b8dd6e1e958b8f95ec7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-23  Bruno Haible  <bruno@clisp.org>
+
+       amemxfrm: Use 'restrict'.
+       * lib/amemxfrm.h (amemxfrm): Use 'restrict'.
+       * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
+
 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        fchmodat, lchmod: simplify
index 7cfc2837f6eb68afb01e7346df6c91e889c55268..2c91388ed2879132fa102ecc79e1d161b7060a86 100644 (file)
@@ -38,7 +38,8 @@ extern "C" {
    freshly allocated string is returned.  In both cases, *lengthp is set to the
    length of the returned string.
    Upon failure, return NULL, with errno set.  */
-extern char * amemxfrm (char *s, size_t n, char *resultbuf, size_t *lengthp);
+extern char * amemxfrm (char *restrict s, size_t n,
+                        char *restrict resultbuf, size_t *lengthp);
 
 
 #ifdef __cplusplus
index fe7e1a43b116a2e8e0f63f20f3a6b88844734776..cf4875363986ff7a73e6f230ccf7ee538124607c 100644 (file)
@@ -8,6 +8,7 @@ lib/amemxfrm.c
 Depends-on:
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += amemxfrm.c