From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>,
Libc-alpha <libc-alpha@sourceware.org>,
linux-man@vger.kernel.org,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
Zack Weinberg <zackw@panix.com>
Subject: Re: [PATCH v3 3/3] system_data_types.7: note struct timespec::tv_nsec type for x32 and portability
Date: Tue, 7 Dec 2021 01:38:34 +0100 [thread overview]
Message-ID: <d400d07c-585c-ded8-afc1-563bb4796881@gmail.com> (raw)
In-Reply-To: <20211206233138.ahvjamiftceufvmj@tarta.nabijaczleweli.xyz>
On 12/7/21 00:31, наб wrote:
> On Mon, Dec 06, 2021 at 11:56:19PM +0100, Alejandro Colomar (man-pages) wrote:
>> I (more or less) understand the deduction of why that happens on certain
>> systems, what I was wondering is if there's an intention behind that, or if
>> it's just an accident. Why not just use plain 'long' always as POSIX says
>> it should be. I don't see the feature part of this bug.
>>
>> 'long' is at least 32 bits, which
>> is enough for 1G. Was there ever a good reason for glibc to use 64 bits? It
>> seems like a wrong decision that is maintained for consistency. If that's it
>> I'm in favor of mentioning it in a Bugs section (as Jakub proposed), instead
>> of a Notes section. Maybe someone from glibc may give a rationale for this
>> deviation from POSIX.
> AFAICT, as you say, this isn't much more than a side-effect
> of using the amd64 ABI and not being too careful with how it interacts
> with the POSIX requirement (it's entirely feasible to re-wrap
> a user-space timespec, or even use the bitfield trick glibc
> already does to not have to do it), but then I'm far from an expert;
> indeed, maybe someone with more glibc involvement will know.
>
> Updating to Bugs for now, maybe we can downgrade later.
Sure, I'll delay applying this patch to allow for comments.
>
>> Maybe preceding the paragraph with "In/On (I never
>> knew if there goes in or on) glibc," would do.
> Out of those two: on (in would point to glibc internals),
> but I'd actually go for "Under", here, since glibc is an over-arching
> (literally) universe-defining context, rather than an add-on,
> or something build your program on top of.
Interesting :)
>
> For my own curiosity: which preposition would you use in Spanish here?
>
I would say "en" (which normally translates to "in" in English).
Under some circumstances I might use "con" ("with" in English), but it
would be rarer.
>> On 12/6/21 23:03, наб wrote:
>>> +.br
>> We don't use '.br'. In this case I think just continuing in the same
>> paragraph would be fine (i.e., no break at all).
>>> +In reality, the field ends up being defined as:
>> Here I'd add a blank line with '.PP'.
>>> +.EX
>>> +.in +4
>> Please, revert the order of .in and .EX.
>> It's meaningless, but I prefer consistency. See man-pages(7), which shows
>> this order, and also the following:
>>
>> $ grep -rn '^\.EX$' -A1 man? | grep '\.in' | wc -l
>> 2
>> $ grep -rn '^\.EX$' -B1 man? | grep '\.in' | wc -l
>> 1048
>>
>>
>> One of those 2 cases was this patch.
> Sure, sure, and sure
>
>>> +#if !(__x86_64__ && __ILP32__ /* == x32 */)
>>
>> Now I notice:
>>
>> Shouldn't this use defined()?
>>
>> #if !(defined(__x86_64__) && defined(__ILP32__) /* == x32 */)
> Eeeeh, not really? That's functionally identical but, like,
> very verbose for no good reason.
Are those defined to actual values? Or are they defined just empty?
I thought they were empty (but have never used those macros, so don't
know at all), in which case it would matter:
user@sqli:~/src/test$ cat defined.c
#define C
#define D
#if A && B
#warning AB
#else
#warning notAB
#endif
#if C && D
#warning CD
#else
#warning notCD
#endif
user@sqli:~/src/test$ cc -Wall -Wextra defined.c
defined.c:7:2: warning: #warning notAB [-Wcpp]
7 | #warning notAB
| ^~~~~~~
defined.c:10:7: error: operator '&&' has no left operand
10 | #if C && D
| ^~
defined.c:13:2: warning: #warning notCD [-Wcpp]
13 | #warning notCD
| ^~~~~~~
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 0:38 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) [this message]
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)
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=d400d07c-585c-ded8-afc1-563bb4796881@gmail.com \
--to=alx.manpages@gmail.com \
--cc=jwilk@jwilk.net \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=nabijaczleweli@nabijaczleweli.xyz \
--cc=zackw@panix.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