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

ChangeLog
lib/c-vasnprintf.h
modules/c-vasnprintf

index 1bc838e793bdaefe0427fc2b97737a9224b34982..9db6d8bba870bf26cbc06d45372319d064335bb1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       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.
index 1a69e56ddf14d8591cd01918f27877713d5df276..0f58fb8257073fad2d538f9219475bcc914fda41 100644 (file)
@@ -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
index ae51ea98f4f6522f289fbb7fad3aa91464a5656f..391d9647fff93856efc6da3bd56feb0694b4be8c 100644 (file)
@@ -39,6 +39,7 @@ multiarch
 verify
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
 
 Makefile.am: