summaryrefslogtreecommitdiff
path: root/lib/mktime-internal.h
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/mktime-internal.h
parent0407733ef3d4e8e133e91917097dbc9bcc688b47 (diff)
downloademacs-fc389d3a836c11893ac5c5894915e9b8b4868799.tar.gz
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/mktime-internal.h')
-rw-r--r--lib/mktime-internal.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h
index 92bdda6f6c3..31cf3a4dab2 100644
--- a/lib/mktime-internal.h
+++ b/lib/mktime-internal.h
@@ -35,3 +35,19 @@ typedef int mktime_offset_t;
time_t mktime_internal (struct tm *,
struct tm * (*) (time_t const *, struct tm *),
mktime_offset_t *);
+
+/* Although glibc source code uses leading underscores, Gnulib wants
+ ordinary names.
+
+ Portable standalone applications should supply a <time.h> that
+ declares a POSIX-compliant localtime_r, for the benefit of older
+ implementations that lack localtime_r or have a nonstandard one.
+ Similarly for gmtime_r. See the gnulib time_r module for one way
+ to implement this. */
+
+#undef __gmtime_r
+#undef __localtime_r
+#define __gmtime_r gmtime_r
+#define __localtime_r localtime_r
+
+#define __mktime_internal mktime_internal