From: Bruno Haible Date: Sun, 23 Feb 2020 11:32:25 +0000 (+0100) Subject: system-quote: Use 'restrict'. X-Git-Tag: v1.0~4216 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=4c37dd4ab504ba644fbcfdb47375398bf0d97b4f;p=gnulib.git system-quote: Use 'restrict'. * lib/system-quote.h (system_quote_copy): Use 'restrict'. * modules/system-quote (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index a00c415c6e..525ecdb78e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + system-quote: Use 'restrict'. + * lib/system-quote.h (system_quote_copy): Use 'restrict'. + * modules/system-quote (configure.ac): Require AC_C_RESTRICT. + sh-quote: Use 'restrict'. * lib/sh-quote.h (shell_quote_copy): Use 'restrict'. * modules/sh-quote (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/system-quote.h b/lib/system-quote.h index d31d47f3c6..419d3b84f8 100644 --- a/lib/system-quote.h +++ b/lib/system-quote.h @@ -77,7 +77,7 @@ extern size_t /* Copies the quoted string to p and returns the incremented p. There must be room for system_quote_length (string) + 1 bytes at p. */ extern char * - system_quote_copy (char *p, + system_quote_copy (char *restrict p, enum system_command_interpreter interpreter, const char *string); diff --git a/modules/system-quote b/modules/system-quote index f34d58aff0..9af74dca50 100644 --- a/modules/system-quote +++ b/modules/system-quote @@ -10,6 +10,7 @@ sh-quote xalloc configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) Makefile.am: lib_SOURCES += system-quote.h system-quote.c