This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
question about queue.h
- From: walter harms <wharms at bfs dot de>
- To: libc-help at sourceware dot org
- Date: Sat, 12 Jul 2008 17:16:48 +0200
- Subject: question about queue.h
- Reply-to: wharms at bfs dot de
hi list,
i have a question about sys/queue.h (not a bug report).
sys/queue.h provides macros for links lists. the code structure looks like this:
#define LIST_ENTRY(type)
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}
is there any (technical) reason why (struct type **) ?
the author (?) provides also a second type that look like this:
#define CIRCLEQ_ENTRY(type) \
struct { \
struct type *cqe_next; /* next element */ \
struct type *cqe_prev; /* previous element */ \
}
is the first an ancient typo that could be fixed ?
i googled a bit and found no good answer.
re,
wh