[PATCH v2 2/2] feature_test_macros.7: document _TIME_BITS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reference: https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
Reference: https://sourceware.org/pipermail/libc-alpha/2022-January/134985.html
Signed-off-by: Sam James <sam@xxxxxxxxxx>
---
 man7/feature_test_macros.7 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7
index cdd962f7f..d33041001 100644
--- a/man7/feature_test_macros.7
+++ b/man7/feature_test_macros.7
@@ -412,6 +412,15 @@ large files with only a recompilation being required.)
 64-bit systems naturally permit file sizes greater than 2 Gigabytes,
 and on those systems this macro has no effect.
 .TP
+.B _TIME_BITS
+Defining this macro with the value 64
+changes the width of
+.BR time_t (3type)
+to 64-bit which allows handling of timestamps beyond
+2038. It is closely related to
+.B _FILE_OFFSET_BITS
+and depending on implementation, may require it set.
+.TP
 .BR _BSD_SOURCE " (deprecated since glibc 2.20)"
 Defining this macro with any value causes header files to expose
 BSD-derived definitions.
@@ -854,6 +863,10 @@ main(int argc, char *argv[])
     printf("_FILE_OFFSET_BITS defined: %d\en", _FILE_OFFSET_BITS);
 #endif
 
+#ifdef _TIME_BITS
+    printf("_TIME_BITS defined: %d\en", _TIME_BITS);
+#endif
+
 #ifdef _BSD_SOURCE
     printf("_BSD_SOURCE defined\en");
 #endif
-- 
2.38.0




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux