public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* queue.7, stailq.3, (simpleq.3): Document SIMPLEQ
@ 2021-02-10 15:06 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 21:30 ` queue.7, stailq.3, (simpleq.3): Document SIMPLEQ Michael Kerrisk (man-pages)
  0 siblings, 2 replies; 10+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-02-10 15:06 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man

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?

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/

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-02-10 21:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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)
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)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox