From: Sam James <sam@gentoo.org>
To: Alejandro Colomar <alx.manpages@gmail.com>,
Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-man@vger.kernel.org, Sam James <sam@gentoo.org>
Subject: [PATCH v2 2/2] feature_test_macros.7: document _TIME_BITS
Date: Thu, 13 Oct 2022 19:30:18 +0100 [thread overview]
Message-ID: <20221013183018.472463-2-sam@gentoo.org> (raw)
In-Reply-To: <20221013183018.472463-1-sam@gentoo.org>
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@gentoo.org>
---
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
next prev parent reply other threads:[~2022-10-13 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 18:30 [PATCH v2 1/2] time_t.3type: reference _TIME_BITS Sam James
2022-10-13 18:30 ` Sam James [this message]
2022-10-13 18:47 ` [PATCH v2 2/2] feature_test_macros.7: document _TIME_BITS Alejandro Colomar
2022-10-13 18:52 ` Sam James
2022-10-13 19:17 ` Alejandro Colomar
2022-10-13 20:57 ` Sam James
2022-10-13 19:19 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221013183018.472463-2-sam@gentoo.org \
--to=sam@gentoo.org \
--cc=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox