>From a765a46c498f55ab1291737a3f6167a58e75d948 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 12:04:46 +0100 Subject: [PATCH 01/29] amemxfrm: Use 'restrict'. * lib/amemxfrm.h (amemxfrm): Use 'restrict'. * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT. --- ChangeLog | 6 ++++++ lib/amemxfrm.h | 3 ++- modules/amemxfrm | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c21e04d..563d770 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 7cfc283..2c91388 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 fe7e1a4..cf48753 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 -- 2.7.4