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

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

index 8b87c6bc650a7c2204c8b8f57061a425e9b42081..a00c415c6ef58b64f2988eaa4e9e5af413312688 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       sh-quote: Use 'restrict'.
+       * lib/sh-quote.h (shell_quote_copy): Use 'restrict'.
+       * modules/sh-quote (configure.ac): Require AC_C_RESTRICT.
+
        quotearg: Use 'restrict'.
        * lib/quotearg.h (quotearg_buffer): Use 'restrict'.
        * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
index 9dcd4cfe41073b62f04e50f65ac30229daf34871..8b06355835c1e1d2592ef8192a89fd1a278f5d33 100644 (file)
@@ -33,7 +33,7 @@ extern size_t shell_quote_length (const char *string);
 
 /* Copies the quoted string to p and returns the incremented p.
    There must be room for shell_quote_length (string) + 1 bytes at p.  */
-extern char * shell_quote_copy (char *p, const char *string);
+extern char * shell_quote_copy (char *restrict p, const char *string);
 
 /* Returns the freshly allocated quoted string.  */
 extern char * shell_quote (const char *string);
index 83fa08905c0651b4236f932198b2e1a38b8848ba..97378f8bb59dcf5a208dcb4a85f4942a5a650820 100644 (file)
@@ -10,6 +10,7 @@ quotearg
 xalloc
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += sh-quote.h sh-quote.c