diff options
Diffstat (limited to 'gnulib/doc/posix-functions/ctime_r.texi')
m--------- | gnulib | 0 | ||||
-rw-r--r-- | gnulib/doc/posix-functions/ctime_r.texi | 37 |
2 files changed, 37 insertions, 0 deletions
diff --git a/gnulib b/gnulib deleted file mode 160000 -Subproject 443bc5ffcf7429e557f4a371b0661abe98ddbc1 diff --git a/gnulib/doc/posix-functions/ctime_r.texi b/gnulib/doc/posix-functions/ctime_r.texi new file mode 100644 index 0000000..83581b7 --- /dev/null +++ b/gnulib/doc/posix-functions/ctime_r.texi @@ -0,0 +1,37 @@ +@node ctime_r +@section @code{ctime_r} +@findex ctime_r + +POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/ctime_r.html} + +Gnulib module: extensions + +Portability problems fixed by Gnulib: +@itemize +@item +This function has an incompatible declaration on some platforms: +Solaris 11 2010-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined). +@end itemize + +Portability problems not fixed by Gnulib: +@itemize +@item +This function is missing on some platforms: +mingw, MSVC 9. +@item +This function may put more than 26 bytes into the argument buffer if an +invalid year is passed. +@end itemize + +@code{ctime_r} takes a pre-allocated buffer and length of the buffer, +and returns @code{NULL} on errors. +The input buffer should be at least 26 bytes in size. The output +string is locale-independent. However, years can have more than 4 +digits if @code{time_t} is sufficiently wide, so the length of the +required output buffer is not easy to determine. Increasing the +buffer size when @code{ctime_r} returns @code{NULL} is not necessarily +sufficient. The @code{NULL} return value could mean some other error +condition, which will not go away by increasing the buffer size. + +A more flexible function is @code{strftime}. However, note that it is +locale dependent. |