summaryrefslogtreecommitdiff
path: root/lib/timespec-sub.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-09-10 21:16:03 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-09-10 21:22:54 -0700
commitfc389d3a836c11893ac5c5894915e9b8b4868799 (patch)
treef62c09355c5e498403f4df5feea99a3d4f7709ff /lib/timespec-sub.c
parent0407733ef3d4e8e133e91917097dbc9bcc688b47 (diff)
downloademacs-fc389d3a836c11893ac5c5894915e9b8b4868799.tar.gz
emacs-fc389d3a836c11893ac5c5894915e9b8b4868799.tar.bz2
emacs-fc389d3a836c11893ac5c5894915e9b8b4868799.zip
Update from Gnulib
This incorporates: 2018-09-10 timespec: fix resolution confusion 2018-09-09 mktime: simplify in prep for glibc merge 2018-09-07 intprops: minor clarification of code 2018-09-06 stddef: Override max_align_t on NetBSD 8.0/x86 2018-09-06 fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku 2018-09-06 strtoll, strtoull: Rely on limits-h module 2018-09-06 limits-h: Provide numerical limits macros 2018-09-06 fcntl: Don't access nonexistent optional argument 2018-09-02 mktime: fix unlikely race+overflow bug 2018-08-31 mktime, timegm: simplify glibc time64_t 2018-08-31 mktime, timegm: simplify merge to glibc * build-aux/config.guess, build-aux/config.sub: * lib/dtotimespec.c, lib/fcntl.c, lib/intprops.h: * lib/limits.in.h, lib/mktime-internal.h, lib/mktime.c: * lib/stat-time.h, lib/strtol.c, lib/timegm.c: * lib/timespec-add.c, lib/timespec-sub.c, lib/timespec.h: * lib/utimens.c, m4/limits-h.m4, m4/stddef_h.m4: Copy from Gnulib.
Diffstat (limited to 'lib/timespec-sub.c')
-rw-r--r--lib/timespec-sub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c
index 398a6a5de47..9eac36e51ac 100644
--- a/lib/timespec-sub.c
+++ b/lib/timespec-sub.c
@@ -19,7 +19,7 @@
/* Return the difference between two timespec values A and B. On
overflow, return an extremal value. This assumes 0 <= tv_nsec <
- TIMESPEC_RESOLUTION. */
+ TIMESPEC_HZ. */
#include <config.h>
#include "timespec.h"
@@ -38,7 +38,7 @@ timespec_sub (struct timespec a, struct timespec b)
if (ns < 0)
{
- rns = ns + TIMESPEC_RESOLUTION;
+ rns = ns + TIMESPEC_HZ;
if (bs < tmax)
bs++;
else if (- TYPE_SIGNED (time_t) < rs)
@@ -63,7 +63,7 @@ timespec_sub (struct timespec a, struct timespec b)
else
{
rs = tmax;
- rns = TIMESPEC_RESOLUTION - 1;
+ rns = TIMESPEC_HZ - 1;
}
}