From: Bruno Haible Date: Sun, 23 Feb 2020 11:15:09 +0000 (+0100) Subject: c-vasnprintf: Use 'restrict'. X-Git-Tag: v1.0~4225 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=fc00c78e289085063c1832a54d73fc784e9f9626;p=gnulib.git c-vasnprintf: Use 'restrict'. * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'. * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index 1bc838e793..9db6d8bba8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + c-vasnprintf: Use 'restrict'. + * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'. + * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT. + c-vsnprintf: Use 'restrict'. * lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'. * modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/c-vasnprintf.h b/lib/c-vasnprintf.h index 1a69e56ddf..0f58fb8257 100644 --- a/lib/c-vasnprintf.h +++ b/lib/c-vasnprintf.h @@ -66,7 +66,8 @@ extern "C" { Formatting takes place in the C locale, that is, the decimal point used in floating-point formatting directives is always '.'. */ -extern char *c_vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) +extern char *c_vasnprintf (char *restrict resultbuf, size_t *lengthp, + const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); #ifdef __cplusplus diff --git a/modules/c-vasnprintf b/modules/c-vasnprintf index ae51ea98f4..391d9647ff 100644 --- a/modules/c-vasnprintf +++ b/modules/c-vasnprintf @@ -39,6 +39,7 @@ multiarch verify configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) gl_PREREQ_VASNPRINTF_WITH_EXTRAS Makefile.am: