diff options
| author | Paul Eggert | 2017-04-30 14:52:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-04-30 14:53:17 -0700 |
| commit | b6aa3446df5e715fd74f010afad75c3c8589a9a1 (patch) | |
| tree | 3b5377b3651ef95a0a77becaa7ee7ccba7b37168 /lib/time.in.h | |
| parent | 3ad9d5c347739bb6c5450ed443ffa1608a94394c (diff) | |
| download | emacs-b6aa3446df5e715fd74f010afad75c3c8589a9a1.tar.gz emacs-b6aa3446df5e715fd74f010afad75c3c8589a9a1.zip | |
Merge from gnulib
This incorporates:
2017-04-30 strftime-fixes: New module
2017-04-30 mktime: Work around TZ problem on native Windows
2017-04-30 ctime, localtime: New modules
2017-04-30 gettimeofday: Provide higher resolution on native Windows
2017-04-29 utime-h: Modernize handling of 'struct utimbuf'
2017-04-29 Make use of module 'utime-h'
2017-04-30 Fix a few typos
* admin/merge-gnulib (AVOIDED_MODULES): Avoid utime-h, too.
* lib/gettimeofday.c, lib/mktime.c, lib/time.in.h, lib/utimens.c:
* m4/gettimeofday.m4, m4/include_next.m4, m4/mktime.m4:
* m4/strftime.m4, m4/time_h.m4, m4/timegm.m4, m4/utimens.m4:
Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib/time.in.h')
| -rw-r--r-- | lib/time.in.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/lib/time.in.h b/lib/time.in.h index fef89807f8a..d2a0302f464 100644 --- a/lib/time.in.h +++ b/lib/time.in.h | |||
| @@ -187,7 +187,7 @@ _GL_CXXALIASWARN (gmtime_r); | |||
| 187 | /* Convert TIMER to RESULT, assuming local time and UTC respectively. See | 187 | /* Convert TIMER to RESULT, assuming local time and UTC respectively. See |
| 188 | <http://www.opengroup.org/susv3xsh/localtime.html> and | 188 | <http://www.opengroup.org/susv3xsh/localtime.html> and |
| 189 | <http://www.opengroup.org/susv3xsh/gmtime.html>. */ | 189 | <http://www.opengroup.org/susv3xsh/gmtime.html>. */ |
| 190 | # if @GNULIB_GETTIMEOFDAY@ | 190 | # if @GNULIB_LOCALTIME@ || @GNULIB_GETTIMEOFDAY@ |
| 191 | # if @REPLACE_LOCALTIME@ | 191 | # if @REPLACE_LOCALTIME@ |
| 192 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 192 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 193 | # undef localtime | 193 | # undef localtime |
| @@ -233,6 +233,41 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, | |||
| 233 | _GL_CXXALIASWARN (strptime); | 233 | _GL_CXXALIASWARN (strptime); |
| 234 | # endif | 234 | # endif |
| 235 | 235 | ||
| 236 | /* Convert *TP to a date and time string. See | ||
| 237 | <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>. */ | ||
| 238 | # if @GNULIB_CTIME@ | ||
| 239 | # if @REPLACE_CTIME@ | ||
| 240 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 241 | # define ctime rpl_ctime | ||
| 242 | # endif | ||
| 243 | _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) | ||
| 244 | _GL_ARG_NONNULL ((1))); | ||
| 245 | _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); | ||
| 246 | # else | ||
| 247 | _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); | ||
| 248 | # endif | ||
| 249 | _GL_CXXALIASWARN (ctime); | ||
| 250 | # endif | ||
| 251 | |||
| 252 | /* Convert *TP to a date and time string. See | ||
| 253 | <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>. */ | ||
| 254 | # if @GNULIB_STRFTIME@ | ||
| 255 | # if @REPLACE_STRFTIME@ | ||
| 256 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 257 | # define strftime rpl_strftime | ||
| 258 | # endif | ||
| 259 | _GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize, | ||
| 260 | const char *__fmt, const struct tm *__tp) | ||
| 261 | _GL_ARG_NONNULL ((1, 3, 4))); | ||
| 262 | _GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, | ||
| 263 | const char *__fmt, const struct tm *__tp)); | ||
| 264 | # else | ||
| 265 | _GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, | ||
| 266 | const char *__fmt, const struct tm *__tp)); | ||
| 267 | # endif | ||
| 268 | _GL_CXXALIASWARN (strftime); | ||
| 269 | # endif | ||
| 270 | |||
| 236 | # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ | 271 | # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ |
| 237 | typedef struct tm_zone *timezone_t; | 272 | typedef struct tm_zone *timezone_t; |
| 238 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | 273 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); |