public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Sam James <sam@gentoo.org>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v2 2/2] feature_test_macros.7: document _TIME_BITS
Date: Thu, 13 Oct 2022 20:47:58 +0200	[thread overview]
Message-ID: <25df66e8-8ce3-1ac6-a93b-460dab055a48@gmail.com> (raw)
In-Reply-To: <20221013183018.472463-2-sam@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 2531 bytes --]

Hi Sam,

On 10/13/22 20:30, Sam James wrote:
> 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

Please use semantic newlines.  See man-pages(7):

    Use semantic newlines
        In the source of a manual page, new sentences  should  be
        started on new lines, long sentences should be split into
        lines  at  clause breaks (commas, semicolons, colons, and
        so on), and long clauses should be split at phrase bound‐
        aries.  This convention,  sometimes  known  as  "semantic
        newlines",  makes it easier to see the effect of patches,
        which often operate at the level of individual sentences,
        clauses, or phrases.

That is: 's/2038. /2038.\n/'

> +.B _FILE_OFFSET_BITS
> +and depending on implementation, may require it set.

Am I understanding this right?  _FILE_OFFSET_BITS is required to be set 
for _TIME_BITS to be also set (in some archs)?  Could you please link 
directly to a source for that in the commit log?  They are somewhat 
related, but I'm quite surprised that something to do with file sizes 
interferes at all with something to do with time.

Thanks,

Alex

> +.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

-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-10-13 18:51 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 ` [PATCH v2 2/2] feature_test_macros.7: document _TIME_BITS Sam James
2022-10-13 18:47   ` Alejandro Colomar [this message]
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=25df66e8-8ce3-1ac6-a93b-460dab055a48@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=sam@gentoo.org \
    /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