]> Savannah Git Hosting - gnulib.git/commitdiff
parse-datetime: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:27:58 +0000 (12:27 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:27:58 +0000 (12:27 +0100)
* lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
'restrict'.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.

ChangeLog
lib/parse-datetime.h
m4/parse-datetime.m4

index 31cd2274c314294d1380ebf5b0ebc9c8b195f262..472ec01aa8b1abe28386516e97698d83fda76510 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       parse-datetime: Use 'restrict'.
+       * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
+       'restrict'.
+       * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.
+
        nstrftime: Use 'restrict'.
        * lib/strftime.h (nstrftime): Use 'restrict'.
        * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.
index ab9b57691e7905f27aba58ea220b9b11533e0145..38363089cd70cdb487a9cc2f0f81ff5f60f4ccf8 100644 (file)
 #include <stdbool.h>
 #include <time.h>
 
-bool parse_datetime (struct timespec *, char const *, struct timespec const *);
+bool parse_datetime (struct timespec *restrict,
+                     char const *, struct timespec const *);
 
 /* parse_datetime2 flag: if set, print debug/progress information to STDERR */
 #define PARSE_DATETIME_DEBUG 1
 
 /* same as above, supporting additional flags */
-bool parse_datetime2 (struct timespec *, char const *, struct timespec const *,
+bool parse_datetime2 (struct timespec *restrict,
+                      char const *, struct timespec const *,
                       unsigned int flags, timezone_t, char const *);
index ebe95411f79e3d57c9f56244befc1627364f479d..52a10aa51cd424c9bf7895f243548d42cd6dc7f5 100644 (file)
@@ -1,4 +1,4 @@
-# parse-datetime.m4 serial 23
+# parse-datetime.m4 serial 24
 dnl Copyright (C) 2002-2006, 2008-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,
@@ -60,6 +60,7 @@ changequote([,])dnl
   dnl Prerequisites of lib/parse-datetime.h.
   AC_REQUIRE([AM_STDBOOL_H])
   AC_REQUIRE([gl_TIMESPEC])
+  AC_REQUIRE([AC_C_RESTRICT])
 
   dnl Prerequisites of lib/parse-datetime.y.
   AC_REQUIRE([gl_BISON])