From: Bruno Haible Date: Sun, 23 Feb 2020 11:06:29 +0000 (+0100) Subject: astrxfrm: Use 'restrict'. X-Git-Tag: v1.0~4228 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b9eae96869cc9cef3865505ab8dc356196f241e9;p=gnulib.git astrxfrm: Use 'restrict'. * lib/astrxfrm.h (astrxfrm): Use 'restrict'. * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index 563d7709f1..80a90eb6b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + astrxfrm: Use 'restrict'. + * lib/astrxfrm.h (astrxfrm): Use 'restrict'. + * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT. + amemxfrm: Use 'restrict'. * lib/amemxfrm.h (amemxfrm): Use 'restrict'. * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/astrxfrm.h b/lib/astrxfrm.h index a23ed707e9..211fe3b24e 100644 --- a/lib/astrxfrm.h +++ b/lib/astrxfrm.h @@ -37,7 +37,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 * astrxfrm (const char *s, char *resultbuf, size_t *lengthp); +extern char * astrxfrm (const char *s, + char *restrict resultbuf, size_t *lengthp); #ifdef __cplusplus diff --git a/modules/astrxfrm b/modules/astrxfrm index e2edc42cc1..053340344c 100644 --- a/modules/astrxfrm +++ b/modules/astrxfrm @@ -8,6 +8,7 @@ lib/astrxfrm.c Depends-on: configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) Makefile.am: lib_SOURCES += astrxfrm.c