Message ID | 20201017213758.9270-1-colomar.6.4.3@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/3] system_data_types.7: time_t: Add Versions note | expand |
On 10/17/20 2:37 PM, Alejandro Colomar via Libc-alpha wrote: > since POSIX.1-2008. > +.PP > +Prior to POSIX.1-2008, > +the type was either an integer type or a real-floating type. No actual POSIXish implementation ever made it a real-floating type, though, and that point should be made lest some conscientious programmer worry about a nonexistent porting issue.
On Sat, Oct 17, 2020 at 9:05 PM Paul Eggert <eggert@cs.ucla.edu> wrote: > On 10/17/20 2:37 PM, Alejandro Colomar via Libc-alpha wrote: > > since POSIX.1-2008. > > +.PP > > +Prior to POSIX.1-2008, > > +the type was either an integer type or a real-floating type. > > No actual POSIXish implementation ever made it a real-floating type, > though, and > that point should be made lest some conscientious programmer worry about a > nonexistent porting issue. It should, at this point, be possible to compile an *exhaustive* list of all the operating systems where time_t wassn’t an integer and/or didn’t count from 1 Jan 1970. Perhaps that list would effectively make the point that this is not a real portability concern. zw >
On 10/18/20 3:05 AM, Paul Eggert wrote: > On 10/17/20 2:37 PM, Alejandro Colomar via Libc-alpha wrote: >> since POSIX.1-2008. >> +.PP >> +Prior to POSIX.1-2008, >> +the type was either an integer type or a real-floating type. > > No actual POSIXish implementation ever made it a real-floating type, though, and > that point should be made lest some conscientious programmer worry about a > nonexistent porting issue. Thanks for catching this, Paul! Alex, I suggest either we drop this patch, or you could reword as something like: "In POSIX.1-2001, the type was specified as being either an integer type or a real-floating type. However, existing implementations used an integer type, and POSIX.1-2008 tightened the specification to reflect this." Thanks, Michael
On 2020-10-18 07:46, Michael Kerrisk (man-pages) wrote: > On 10/18/20 3:05 AM, Paul Eggert wrote: >> On 10/17/20 2:37 PM, Alejandro Colomar via Libc-alpha wrote: >>> since POSIX.1-2008. >>> +.PP >>> +Prior to POSIX.1-2008, >>> +the type was either an integer type or a real-floating type. >> >> No actual POSIXish implementation ever made it a real-floating type, though, and >> that point should be made lest some conscientious programmer worry about a >> nonexistent porting issue. > > Thanks for catching this, Paul! > > Alex, I suggest either we drop this patch, or you could reword as > something like: > > "In POSIX.1-2001, the type was specified as being either an integer > type or a real-floating type. However, existing implementations > used an integer type, and POSIX.1-2008 tightened the specification > to reflect this." > > Thanks, > > Michael > Thanks, Paul! Michael, I would opt for the simpler: drop the patch. Thanks, Alex
>> Alex, I suggest either we drop this patch, or you could reword as >> something like: >> >> "In POSIX.1-2001, the type was specified as being either an integer >> type or a real-floating type. However, existing implementations >> used an integer type, and POSIX.1-2008 tightened the specification >> to reflect this." >> >> Thanks, >> >> Michael >> > > Thanks, Paul! > > Michael, I would opt for the simpler: drop the patch. Okay. Thanks, Michael
diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index 8a894b2e0..dc5f65c0d 100644 --- a/man7/system_data_types.7 +++ b/man7/system_data_types.7 @@ -1236,6 +1236,9 @@ defines .I time_t since POSIX.1-2008. +.PP +Prior to POSIX.1-2008, +the type was either an integer type or a real-floating type. .PP Conforming to: C99 and later; POSIX.1-2001 and later. .PP
Prior to POSIX.1-2008, POSIX allowed time_t to be a real-floating type. Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> --- Hi Michael, I found this thing when writing about clock_t. BTW, I'm not sure about the .PP before the paragraph (it feels like "Versions" is too far away from it), but it's unrelated to the previous Versions note, so I kept it. Regards, Alex man7/system_data_types.7 | 3 +++ 1 file changed, 3 insertions(+)