From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: Stefan Puiu <stefan.puiu@gmail.com>
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>,
lnx-man <linux-man@vger.kernel.org>,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Subject: Re: [PATCH v2 3/4] system_data_types.7: correct struct timespec::tv_nsec type for x32
Date: Tue, 7 Dec 2021 12:05:50 +0100 [thread overview]
Message-ID: <6834024b-38d1-5c12-dcbf-a3e80488fd35@gmail.com> (raw)
In-Reply-To: <CACKs7VDHgVLAOPteGjTwo8FD_WGMcuiX7uxpGq0VnZTinkpeEQ@mail.gmail.com>
Hi, Stefan!
On 12/7/21 12:02, Stefan Puiu wrote:
>> Notes: glibc uses long long instead of long for tv_nsec in some
>> architectures:
>>
>> #if !(__x86_64__ && __ILP32__ /* == x32 */)
>> long tv_nsec;
>> #else
>> long long tv_nsec;
>> #endif
>
> The #if condition is actually "we're not on x32", so maybe the comment
> could say /* != x32 */? Otherwise it looks like the comment
> contradicts the code; I know the comment is inside the paranthesis,
> and the negation ('!') is outside, but the negation might be easy to
> overlook.
>
> Or maybe leave the x32 field size for a note? (E.g. something like
> "This is true on almost all arches, but see NOTES", and then under
> NOTES specify that "actually, on x32 tv_nsec is long long"). The #if
> in the definition doesn't *exactly* match the code anyway.
In the latest version of the patch (unfortunately it's not tagged as
v4), we removed the negation to avoid that problem.
Thanks for reporting it :)
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
next prev parent reply other threads:[~2021-12-07 11:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-28 18:17 [PATCH 1/4] clock_getres.2, clock_nanosleep.2, io_getevents.2, nanosleep.2, poll.2, sched_rr_get_interval.2, select.2, sigwaitinfo.2, timer_settime.2, timerfd_create.2, utimensat.2, mq_receive.3, mq_send.3, pthread_tryjoin_np.3, sem_wait.3, system_data_types.7: standardise on struct timespec fields comments to ucase w/tv_nsec range наб
2021-11-28 18:17 ` [PATCH 2/4] poll.2, sigwaitinfo.2: fix struct timespec::tv_sec to be time_t, not long наб
2021-11-29 12:27 ` Alejandro Colomar (man-pages)
2021-11-28 18:17 ` [PATCH 3/4] clock_getres.2, clock_nanosleep.2, io_getevents.2, nanosleep.2, poll.2, sched_rr_get_interval.2, select.2, sigwaitinfo.2, timer_settime.2, timerfd_create.2, utimensat.2, mq_receive.3, mq_send.3, pthread_tryjoin_np.3, system_data_types.7: correct struct timespec::tv_nsec type for x32 наб
2021-11-29 9:45 ` Jakub Wilk
2021-11-29 12:31 ` Alejandro Colomar (man-pages)
2021-12-03 23:46 ` наб
2021-12-06 19:18 ` [PATCH 3/4] Many pages: " Alejandro Colomar (man-pages)
2021-12-06 20:11 ` [PATCH v2 0/4] timespec(3) migration наб
2021-12-06 20:12 ` [PATCH v2 1/4] clock_getres.2, clock_nanosleep.2, io_getevents.2, nanosleep.2, poll.2, sched_rr_get_interval.2, select.2, sigwaitinfo.2, timerfd_create.2, timer_settime.2, utimensat.2, mq_receive.3, mq_send.3, pthread_tryjoin_np.3, sem_wait.3: replace in-line struct timespec declarations with "timespec(3) structure" references наб
2021-12-06 21:14 ` Alejandro Colomar (man-pages)
2021-12-06 20:12 ` [PATCH v2 2/4] system_data_types.7: standardise on struct timespec fields comments to ucase w/tv_nsec range наб
2021-12-06 21:18 ` Alejandro Colomar (man-pages)
2021-12-06 20:12 ` [PATCH v2 3/4] system_data_types.7: correct struct timespec::tv_nsec type for x32 наб
2021-12-06 21:30 ` Alejandro Colomar (man-pages)
2021-12-06 22:03 ` [PATCH v3 3/3] system_data_types.7: note struct timespec::tv_nsec type for x32 and portability наб
2021-12-06 22:56 ` Alejandro Colomar (man-pages)
2021-12-06 23:31 ` наб
2021-12-07 0:38 ` Alejandro Colomar (man-pages)
2021-12-07 1:08 ` наб
2021-12-07 1:34 ` Alejandro Colomar (man-pages)
[not found] ` <a55c07d0-960f-4dfe-90bf-4fee33976198@www.fastmail.com>
[not found] ` <7c29781b-1030-44f9-b078-f5b09a14e321@gmail.com>
2021-12-07 1:41 ` наб
2021-12-07 18:43 ` Joseph Myers
2021-12-07 18:52 ` Florian Weimer
2022-01-03 15:44 ` наб
2022-01-03 16:54 ` Alejandro Colomar (man-pages)
2021-12-07 11:02 ` [PATCH v2 3/4] system_data_types.7: correct struct timespec::tv_nsec type for x32 Stefan Puiu
2021-12-07 11:05 ` Alejandro Colomar (man-pages) [this message]
2021-12-06 20:12 ` [PATCH v2 4/4] system_data_types.7: note that struct timespec::tv_nsec being long long on x32 is an extension наб
2021-11-28 18:17 ` [PATCH " наб
2021-11-29 12:26 ` [PATCH 1/4] clock_getres.2, clock_nanosleep.2, io_getevents.2, nanosleep.2, poll.2, sched_rr_get_interval.2, select.2, sigwaitinfo.2, timer_settime.2, timerfd_create.2, utimensat.2, mq_receive.3, mq_send.3, pthread_tryjoin_np.3, sem_wait.3, system_data_types.7: standardise on struct timespec fields comments to ucase w/tv_nsec range Alejandro Colomar (man-pages)
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=6834024b-38d1-5c12-dcbf-a3e80488fd35@gmail.com \
--to=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=nabijaczleweli@nabijaczleweli.xyz \
--cc=stefan.puiu@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