>From 4c37dd4ab504ba644fbcfdb47375398bf0d97b4f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 12:32:25 +0100 Subject: [PATCH 14/29] system-quote: Use 'restrict'. * lib/system-quote.h (system_quote_copy): Use 'restrict'. * modules/system-quote (configure.ac): Require AC_C_RESTRICT. --- ChangeLog | 4 ++++ lib/system-quote.h | 2 +- modules/system-quote | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a00c415..525ecdb 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 d31d47f..419d3b8 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 f34d58a..9af74dc 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 -- 2.7.4