[glibc] manual: clarify _FILE_OFFSET_BITS Y2038 implications [BZ #34095]

Adhemerval Zanella via Glibc-cvs <[email protected]>
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f071e2b4a0b20880fa2ff2a4defd9b59d31d91b6

commit f071e2b4a0b20880fa2ff2a4defd9b59d31d91b6
Author: Shamil Abdulaev <[email protected]>
Date:   Tue Apr 28 13:34:09 2026 -0300

    manual: clarify _FILE_OFFSET_BITS Y2038 implications [BZ #34095]
    
    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 <[email protected]>

Diff:
---
 manual/creature.texi | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/manual/creature.texi b/manual/creature.texi
index 90f9f8e35b..476197d4a6 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.