diff options
author | Bruno Haible <bruno@clisp.org> | 2017-04-30 17:56:49 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-04-30 19:26:39 +0200 |
commit | 05226f4e52f0d6ff55c598c24b07672cc6fa295e (patch) | |
tree | 3430fd48548673bf6bbf789a867f0d10f9d4d74e /lib/wchar.in.h | |
parent | 9df4babee613569704bd8947de9a3cd46086b43e (diff) | |
download | gnulib-05226f4e52f0d6ff55c598c24b07672cc6fa295e.tar.gz |
wcsftime: New module.
* lib/wchar.in.h (wcsftime): New declaration.
* lib/wcsftime.c: New file.
* m4/wcsftime.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
(gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wcsftime: New file.
* doc/posix-functions/wcsftime.texi: Mention the new module.
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r-- | lib/wchar.in.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 4969a0c99a..ef155d22d7 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -1036,6 +1036,38 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " #endif +/* Convert *TP to a date and time wide string. See + <http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */ +#if @GNULIB_WCSFTIME@ +# if @REPLACE_WCSFTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsftime +# define wcsftime rpl_wcsftime +# endif +_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp)); +# else +# if !@HAVE_WCSFTIME@ +_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp) + _GL_ARG_NONNULL ((1, 3, 4))); +# endif +_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp)); +# endif +_GL_CXXALIASWARN (wcsftime); +#elif defined GNULIB_POSIXCHECK +# undef wcsftime +# if HAVE_RAW_DECL_WCSFTIME +_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " + "use gnulib module wcsftime for portability"); +# endif +#endif + + #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif |