]> Savannah Git Hosting - gnulib.git/commitdiff
doc: mention 32-bit time_t issue
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Jan 2020 19:45:19 +0000 (11:45 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Jan 2020 19:45:32 +0000 (11:45 -0800)
* doc/posix-headers/sys_stat.texi (sys/stat.h):
* doc/posix-headers/time.texi (time.h): Mention 2038.

ChangeLog
doc/posix-headers/sys_stat.texi
doc/posix-headers/time.texi

index c18a95adf05af38c1ab839dbfa32883fc1c7a42a..6c0d925045d89cdbc172df5e030f346eecc5699f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       doc: mention 32-bit time_t issue
+       * doc/posix-headers/sys_stat.texi (sys/stat.h):
+       * doc/posix-headers/time.texi (time.h): Mention 2038.
+
 2020-01-03  Bruno Haible  <bruno@clisp.org>
 
        mbrtowc: Ensure the mbtowc_lock is unique.
index 55a23e4b2d15d90164b2e87dcf771c57ce96f98b..78b423097b86f73b7b9b50c7afd199c03a2f0a68 100644 (file)
@@ -40,6 +40,9 @@ On Windows platforms (excluding Cygwin), @code{st_ino} is always 0.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+@xref{time.h}, for general portability problems with the
+@code{time_t} components of @code{struct stat}.
+@item
 The macro @code{S_IFBLK} is missing on some platforms:
 MSVC 14.
 @item
index ef840fe38d4910a31e9bfc53cb619b306e4a0028..67741ca56b31164b2c0b122db9e1d7f9a14ec3ec 100644 (file)
@@ -19,8 +19,15 @@ NetBSD 5.0
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On platforms with 32-bit @code{time_t}, functions like @code{stat} can
+fail with @code{errno == EOVERFLOW} when a timestamp is out of range,
+such as with a file timestamp in the far future or past; on others,
+the functions silently return the low-order 32 bits of the correct
+timestamp.  These platforms will be obsolete when 32-bit @code{time_t}
+rolls around, which will occur the year 2038 for the typical case when
+@code{time_t} is signed.
+@item
 On some platforms the @code{tv_nsec} member of @code{struct timespec}
 is not of type @code{long}, but is of type @code{long long} instead:
 glibc x32
-
 @end itemize