summaryrefslogtreecommitdiff
path: root/lib/mktime-internal.h
diff options
context:
space:
mode:
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