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

ChangeLog
lib/strftime.h
m4/nstrftime.m4

index cf441aefcd96b8ea4ba5d29c0d058d7f9755b94c..31cd2274c314294d1380ebf5b0ebc9c8b195f262 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       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'.
 
index 97a062c631d50f5efb24dfacbd0efebc4c360a40..e8501631573067d3a97991fc5e8c56955f10d444 100644 (file)
@@ -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
index c15fab3e98b2b1bb810ce105a1a9010a0eb875c8..6f2762aa2766723c74900c6a0231807e5a3afe11 100644 (file)
@@ -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])