mirror of https://github.com/omar-polo/gmid.git
check if sys/queue.h provides TAILQ_FOREACH_SAFE
This commit is contained in:
parent
b8e64ccd44
commit
f2522b4313
|
@ -18,12 +18,18 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
struct ibuf {
|
TAILQ_HEAD(tailhead, entry) head;
|
||||||
TAILQ_ENTRY(ibuf) entry;
|
struct entry {
|
||||||
};
|
TAILQ_ENTRY(entry) entries;
|
||||||
|
} *np, *nt;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
|
TAILQ_INIT(&head);
|
||||||
|
TAILQ_FOREACH_SAFE(np, &head, entries, nt) {
|
||||||
|
/* nop */;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue