From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: linux-man <linux-man@vger.kernel.org>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: queue.7, stailq.3, (simpleq.3): Document SIMPLEQ as an alias of STAILQ
Date: Wed, 10 Feb 2021 16:13:02 +0100 [thread overview]
Message-ID: <864a2689-0c9a-40c9-3732-d99bc44fed4d@gmail.com> (raw)
In-Reply-To: <17824adc-1b73-cae4-781a-6ad8893c3c66@gmail.com>
On 2/10/21 4:11 PM, Alejandro Colomar (man-pages) wrote:
> [ CC += glibc ]
>
> On 2/10/21 4:06 PM, Alejandro Colomar (man-pages) wrote:
>> Hi Michael,
>>
>> When I refactored queue.3, I found out that there was no documentation
>> for SIMPLEQ. I didn't do anything about it because I've never used it
>> and didn't understand what it was, and more importantly why.
>>
>> Now I found out that it only exists because of historical reasons [1],
>> but it is identical to STAILQ (minus a missing SIMPLEQ equivalent for
>> STAILQ_CONCAT()). So I'd add links simpleq.3, SIMPLEQ_*.3 -> STAILQ.3,
>> and add a paragraph to queue.7 and another one to stailq.3.
>>
>> What do you think about the following?
>>
>> Also I don't know if we should encourage one of them. STAILQ seems to
>> be more complete. What would you do about it?
>
> BTW, a suggestion for glibc: glibc could simplify the code with things like
>
> #define SIMPLEQ_ENTRY(type) STAILQ(type)
s/STAILQ/&_ENTRY/
>
> It would make it more obvious that they're the same thing.
>
>>
>> Thanks,
>>
>> Alex
>>
>> [1]: <https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/5>
>>
>> ---
>>
>> $ git diff
>> diff --git a/man7/queue.7 b/man7/queue.7
>> index f92887a36..c3facafd0 100644
>> --- a/man7/queue.7
>> +++ b/man7/queue.7
>> @@ -138,6 +138,15 @@ Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
>> Present on the BSDs.
>> .I <sys/queue.h>
>> macros first appeared in 4.4BSD.
>> +.SH NOTES
>> +Some BSDs provide SIMPLEQ instead of STAILQ.
>> +The interfaces are identical, but for historical reasons
>> +they were named differently on different BSDs.
>> +STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD.
>> +For compatibility, glibc provides both sets of macros.
>> .SH SEE ALSO
>> .BR circleq (3),
>> .BR insque (3),
>>
>
>
--
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-02-10 15:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 15:06 queue.7, stailq.3, (simpleq.3): Document SIMPLEQ Alejandro Colomar (man-pages)
2021-02-10 15:11 ` queue.7, stailq.3, (simpleq.3): Document SIMPLEQ as an alias of STAILQ Alejandro Colomar (man-pages)
2021-02-10 15:13 ` Alejandro Colomar (man-pages) [this message]
2021-02-10 15:38 ` Zack Weinberg
2021-02-10 15:53 ` Alejandro Colomar (man-pages)
2021-02-10 16:05 ` Zack Weinberg
2021-02-10 16:24 ` Alejandro Colomar (man-pages)
2021-02-10 16:36 ` Zack Weinberg
2021-02-10 21:16 ` Michael Kerrisk (man-pages)
2021-02-10 21:30 ` queue.7, stailq.3, (simpleq.3): Document SIMPLEQ Michael Kerrisk (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=864a2689-0c9a-40c9-3732-d99bc44fed4d@gmail.com \
--to=alx.manpages@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@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