>From 90106dbaf4b8881139bb3e567da8bbc1bad2055f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 12:29:41 +0100 Subject: [PATCH 12/29] quotearg: Use 'restrict'. * lib/quotearg.h (quotearg_buffer): Use 'restrict'. * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT. --- ChangeLog | 4 ++++ lib/quotearg.h | 2 +- m4/quotearg.m4 | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 472ec01..8b87c6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + 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'. diff --git a/lib/quotearg.h b/lib/quotearg.h index d30fdd1..3bf149b 100644 --- a/lib/quotearg.h +++ b/lib/quotearg.h @@ -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); diff --git a/m4/quotearg.m4 b/m4/quotearg.m4 index b6eb16b..4038711 100644 --- a/m4/quotearg.m4 +++ b/m4/quotearg.m4 @@ -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]) : ]) -- 2.7.4