diff options
author | Mark H Weaver <mhw@netris.org> | 2014-02-03 21:04:39 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-02-03 21:05:52 -0500 |
commit | 5e69ceb7a667377a61cb0c31d7ac20e245b3fafd (patch) | |
tree | ef1e4fe569392fd4630dfcfc26d9948b7e6ffac5 /lib/time.in.h | |
parent | 866af5da3d11ac4a9df44ee8c5b1781a0073c288 (diff) |
Update Gnulib to v0.1-77-gd9361da
Diffstat (limited to 'lib/time.in.h')
-rw-r--r-- | lib/time.in.h | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/lib/time.in.h b/lib/time.in.h index 71dcc36f9..01681cc8c 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -1,6 +1,6 @@ /* A more-standard <time.h>. - Copyright (C) 2007-2013 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -48,20 +48,13 @@ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in <sys/time.h> - (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the - pthreads-win32 library defines it in <pthread.h>. */ + (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, + but the pthreads-win32 library defines it in <pthread.h>. */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include <sys/time.h> # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include <pthread.h> -/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */ -# undef asctime_r -# undef ctime_r -# undef gmtime_r -# undef localtime_r -# undef rand_r -# undef strtok_r # else # ifdef __cplusplus @@ -187,6 +180,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>. */ |