]> Savannah Git Hosting - gnulib.git/commitdiff
quotearg: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:29:41 +0000 (12:29 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:29:41 +0000 (12:29 +0100)
* lib/quotearg.h (quotearg_buffer): Use 'restrict'.
* m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.

ChangeLog
lib/quotearg.h
m4/quotearg.m4

index 472ec01aa8b1abe28386516e97698d83fda76510..8b87c6bc650a7c2204c8b8f57061a425e9b42081 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       quotearg: Use 'restrict'.
+       * lib/quotearg.h (quotearg_buffer): Use 'restrict'.
+       * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
+
        parse-datetime: Use 'restrict'.
        * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
        'restrict'.
index d30fdd161b54183d732a410da3b13611ff13dd9d..3bf149b397579479464a316a32b69ede5621e428 100644 (file)
@@ -323,7 +323,7 @@ void set_custom_quoting (struct quoting_options *o,
    On output, BUFFER might contain embedded null bytes if ARGSIZE was
    not -1, the style of O does not use backslash escapes, and the
    flags of O do not request elision of null bytes.*/
-size_t quotearg_buffer (char *buffer, size_t buffersize,
+size_t quotearg_buffer (char *restrict buffer, size_t buffersize,
                         char const *arg, size_t argsize,
                         struct quoting_options const *o);
 
index b6eb16b278b38ef54da486a3da365592739540b9..40387119b57225794dcfcd70ea17066ca2ac170f 100644 (file)
@@ -1,4 +1,4 @@
-# quotearg.m4 serial 9
+# quotearg.m4 serial 10
 dnl Copyright (C) 2002, 2004-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_QUOTEARG],
 [
+  AC_REQUIRE([AC_C_RESTRICT])
   :
 ])