summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@gnu.org>2020-05-14 12:36:11 +0200
committerAndreas Gruenbacher <agruen@gnu.org>2020-05-14 14:01:13 +0200
commit099394003477b83c2eb4be07fd0173d6e696cf4e (patch)
tree12c8f980a170764423b1266d8979de6ccb99d310 /src/util.c
parent78ed9decdf54d6185d3d3d1ef8784f5978f81422 (diff)
downloadpatch-099394003477b83c2eb4be07fd0173d6e696cf4e.tar.gz
gnulib: update to latest
* bootstrap: Update. * bootstrap.conf (gnulib_modules): Replace getdate with parse-datetime, malloc with malloc-gnu, and realloc with realloc-gnu. * src/patch.c (main): Function find_backup_file_name has gained a new dir_fd argument. * src/util.c (create_backup): Likewise. (fetchname): Function get_date has been renamed to parse_datetime.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index fb38307..c3ff5dd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -29,7 +29,7 @@
#include <xalloc.h>
#include <xmemdup0.h>
-#include <getdate.h>
+#include <parse-datetime.h>
#include "ignore-value.h"
#include "error.h"
@@ -374,7 +374,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
}
else
{
- bakname = find_backup_file_name (to, backup_type);
+ bakname = find_backup_file_name (AT_FDCWD, to, backup_type);
if (!bakname)
xalloc_die ();
}
@@ -1540,7 +1540,7 @@ fetchname (char const *at, int strip_leading, char **pname,
}
if (set_time | set_utc)
- get_date (&stamp, t, &initial_time);
+ parse_datetime (&stamp, t, &initial_time);
else
{
/* The head says the file is nonexistent if the
@@ -1550,7 +1550,7 @@ fetchname (char const *at, int strip_leading, char **pname,
offset < +26:00. Match any time in that range. */
const struct timespec lower = { -25L * 60 * 60 },
upper = { 26L * 60 * 60 };
- if (get_date (&stamp, t, &initial_time)
+ if (parse_datetime (&stamp, t, &initial_time)
&& timespec_cmp (stamp, lower) > 0
&& timespec_cmp (stamp, upper) < 0) {
stamp.tv_sec = 0;