insque.3: Noted prev == NULL bug in glibc 2.4 and earlier

As noted by Remi Denis-Courmont, glibc nowadays allows
'prev' to be NULL, as required by POSIX for initializing
a linear list. But in glibc 2.4 and earlier, 'prev' could
not be NULL. Add a BUGS section noting this.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551201

Reported-by: Remi Denis-Courmont <remi@remlab.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-09-09 09:46:29 +02:00
parent d26b92899b
commit 60f4b757b2
1 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,8 @@
.\" Curry's "UNIX Systems Programming for SVR4" (O'Reilly & Associates 1996)
.\"
.\" Changed to POSIX, 2003-08-11, aeb+wh
.\" mtk, 2010-09-09: Noted glibc 2.4 bug, added info on circular
.\" lists, added example program
.\"
.TH INSQUE 3 2010-09-09 "" "Linux Programmer's Manual"
.SH NAME
@ -115,6 +117,13 @@ The above is the POSIX version.
Some systems place them in \fI<string.h>\fP.
Linux libc4 and libc 5 placed them
in \fI<stdlib.h>\fP.
.SH BUGS
In glibc 2.4 and earlier, it was not possible to specify
.I prev
as NULL.
Consequently, to build a linear list, the caller had to build a list
using an initial call that contained the first two elements of the list,
with the forward and backward pointers in each element suitably initialized.
.SH EXAMPLE
The program below demonstrates the use of
.BR insque ().