]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: clarify _FILE_OFFSET_BITS Y2038 implications [BZ #34095]
authorShamil Abdulaev <ashamil435@gmail.com>
Tue, 28 Apr 2026 16:34:09 +0000 (13:34 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Apr 2026 16:34:09 +0000 (13:34 -0300)
The existing paragraph warning about _FILE_OFFSET_BITS default changes
due to Y2038 is correct but confusing, as it does not explicitly state
why time_t concerns affect _FILE_OFFSET_BITS.

Clarify that _TIME_BITS=64 (needed for Y2038 safety) requires
_FILE_OFFSET_BITS=64, so when systems migrate to 64-bit time_t by
default, _FILE_OFFSET_BITS will also need to default to 64, even for
applications that do not handle large files.

This addresses the confusion noted in the bug report while keeping the
warning in place, as the transitive dependency makes it relevant to
the _FILE_OFFSET_BITS documentation.

Signed-off-by: Shamil Abdulaev <ashamil435@gmail.com>
manual/creature.texi

index 90f9f8e35b2cad4520990838b1d8b25d36005a33..476197d4a687654c5d6d81619d282799f36994ec 100644 (file)
@@ -162,9 +162,13 @@ Instead the old function names now reference the new functions, e.g., a
 call to @code{fseeko} now indeed calls @code{fseeko64}.
 
 If the macro is not defined it currently defaults to @code{32}, but
-this default is planned to change due to a need to update
-@code{time_t} for Y2038 safety, and applications should not rely on
-the default.
+this default is planned to change in the future.  This is because
+@code{_TIME_BITS=64} (required for @code{time_t} Y2038 safety) can
+only be used together with @code{_FILE_OFFSET_BITS=64}.  When systems
+migrate to 64-bit @code{time_t} by default, @code{_FILE_OFFSET_BITS}
+will also need to default to @code{64}, even for applications that
+do not handle large files.  Applications should not rely on the
+current default.
 
 This macro should only be selected if the system provides mechanisms for
 handling large files.  On @w{64 bit} systems this macro has no effect