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

ChangeLog
lib/system-quote.h
modules/system-quote

index a00c415c6ef58b64f2988eaa4e9e5af413312688..525ecdb78e755c9819f9e57ebf278962757d2e08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       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.
index d31d47f3c60f1134ca1215a932c13e9793327d91..419d3b84f8e95c5c9dcf893dd6b70f1c430cf021 100644 (file)
@@ -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);
 
index f34d58aff0e98cd3aeeeef43e2b255512c53cb03..9af74dca50522ede65dfc05e31f027bc9eebf1b8 100644 (file)
@@ -10,6 +10,7 @@ sh-quote
 xalloc
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += system-quote.h system-quote.c