>From bf19526c73eb07080946178390834c2ab8ddfb83 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 12:25:42 +0100 Subject: [PATCH 10/29] nstrftime: Use 'restrict'. * lib/strftime.h (nstrftime): Use 'restrict'. * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT. --- ChangeLog | 4 ++++ lib/strftime.h | 2 +- m4/nstrftime.m4 | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf441ae..31cd227 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + nstrftime: Use 'restrict'. + * lib/strftime.h (nstrftime): Use 'restrict'. + * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT. + mbstok_r: Use 'restrict'. * lib/string.in.h (mbstok_r): Use 'restrict'. diff --git a/lib/strftime.h b/lib/strftime.h index 97a062c..e850163 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -25,7 +25,7 @@ extern "C" { POSIX requires that strftime use the local timezone information. Use the timezone __TZ instead. Use __NS as the number of nanoseconds in the %N directive. */ -size_t nstrftime (char *, size_t, char const *, struct tm const *, +size_t nstrftime (char *restrict, size_t, char const *, struct tm const *, timezone_t __tz, int __ns); #ifdef __cplusplus diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4 index c15fab3..6f2762a 100644 --- a/m4/nstrftime.m4 +++ b/m4/nstrftime.m4 @@ -1,4 +1,4 @@ -# serial 34 +# serial 35 # Copyright (C) 1996-1997, 1999-2007, 2009-2020 Free Software Foundation, Inc. # @@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_GNU_STRFTIME], [ + AC_REQUIRE([AC_C_RESTRICT]) + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. AC_REQUIRE([AC_STRUCT_TIMEZONE]) -- 2.7.4