From: Bruno Haible Date: Sun, 23 Feb 2020 11:04:46 +0000 (+0100) Subject: amemxfrm: Use 'restrict'. X-Git-Tag: v1.0~4229 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a765a46c498f55ab1291737a3f6167a58e75d948;p=gnulib.git amemxfrm: Use 'restrict'. * lib/amemxfrm.h (amemxfrm): Use 'restrict'. * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index c21e04d00e..563d7709f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-02-23 Bruno Haible + + amemxfrm: Use 'restrict'. + * lib/amemxfrm.h (amemxfrm): Use 'restrict'. + * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT. + 2020-02-22 Paul Eggert fchmodat, lchmod: simplify diff --git a/lib/amemxfrm.h b/lib/amemxfrm.h index 7cfc2837f6..2c91388ed2 100644 --- a/lib/amemxfrm.h +++ b/lib/amemxfrm.h @@ -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 diff --git a/modules/amemxfrm b/modules/amemxfrm index fe7e1a43b1..cf48753639 100644 --- a/modules/amemxfrm +++ b/modules/amemxfrm @@ -8,6 +8,7 @@ lib/amemxfrm.c Depends-on: configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) Makefile.am: lib_SOURCES += amemxfrm.c