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

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

 




> On 13 Oct 2022, at 19:47, Alejandro Colomar <alx.manpages@xxxxxxxxx> wrote:
> 
> 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@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
> 
> 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.
> 

Mea culpa -- let me read that over again :)

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

Yes, it's shocking, but true!

I'll add a reference -- but it's in /usr/include/features-time64.h:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/features-time64.h

Best,
sam

Attachment: signature.asc
Description: Message signed with OpenPGP


[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