diff options
Diffstat (limited to 'manual/creature.texi')
-rw-r--r-- | manual/creature.texi | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/manual/creature.texi b/manual/creature.texi index 705a949089..9fa658e9a7 100644 --- a/manual/creature.texi +++ b/manual/creature.texi @@ -165,6 +165,50 @@ This macro was introduced as part of the Large File Support extension (LFS). @end defvr +@defvr Macro _TIME_BITS +This macro determines the bit size of @code{time_t} (and therefore the +bit size of all @code{time_t} derived types and the prototypes of all +related functions). If @code{_TIME_BITS} is undefined, the bit size of +@code{time_t} is architecture dependent. + +Possible values of @code{_TIME_BITS}: +@enumerate +@item +@code{_TIME_BITS=64} and port from the outset uses 64-bit +@code{time_t} and word size equals to @w{64 bits} (e.g. x86_64) - no +action + +@item +@code{_TIME_BITS=32} and port from the outset uses 32-bit +@code{time_t} and word size equals to @w{64 bits} (e.g. ARM) - no +action + +@item +@code{_TIME_BITS=64} and port from the outset uses 64-bit +@code{time_t} and word size equals to @w{32 bits} (e.g. ARC, RV32) +- no action + +@item +@code{_TIME_BITS=64} and port from the outset uses 32-bit +@code{time_t} and word size equals to @w{32 bits} (e.g. ARM) +- the @code{time_t} is modified to be able to hold 64-bit time. + +@item +For any other use case the compile-time error is emitted. +@end enumerate + +The @code{_TIME_BITS} can be only used when @code{_FILE_OFFSET_BITS=64} +is also defined. + +For the point @b{4} above, calls to proper syscalls depend on the +Linux kernel version on which the system is running. For Linux kernel +version above @b{5.1} syscalls supporting 64-bit time are used. Otherwise, +a fallback code is used with legacy (i.e. 32-bit) syscalls. + +By using this macro certain ports gain support for 64-bit time and as +a result become immune to Y2038 problem. +@end defvr + @defvr Macro _ISOC99_SOURCE @standards{GNU, (none)} If this macro is defined, features from ISO C99 are included. Since |