summaryrefslogtreecommitdiff
path: root/lib/time.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-12-17 12:43:43 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-12-17 12:43:43 -0800
commite9ad5665ede9f7599b7b26a7e478fd3e56ddf36e (patch)
treece45512be929919b0c1e0c34bfb6dcb313c645aa /lib/time.in.h
parent2d6b6005bcf3cc4ece90c0d19a645ca3ae1940ea (diff)
downloademacs-e9ad5665ede9f7599b7b26a7e478fd3e56ddf36e.tar.gz
Merge from gnulib, incorporating:
2013-12-17 gettimeofday: port recent C++ fix to Emacs 2013-12-17 gettimeofday: fix C++ crosscompilation 2013-12-17 qacl: port to Windows better * lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4: Update from gnulib. * lib/gnulib.mk: Regenerate.
Diffstat (limited to 'lib/time.in.h')
-rw-r--r--lib/time.in.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/time.in.h b/lib/time.in.h
index 8ced7947445..d4c99061464 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -187,6 +187,39 @@ _GL_CXXALIASWARN (gmtime_r);
# endif
# endif
+/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
+ <http://www.opengroup.org/susv3xsh/localtime.html> and
+ <http://www.opengroup.org/susv3xsh/gmtime.html>. */
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_LOCALTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef localtime
+# define localtime rpl_localtime
+# endif
+_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (localtime);
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GMTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gmtime
+# define gmtime rpl_gmtime
+# endif
+_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (gmtime);
+# endif
+
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */