Fix AIX build issue with TAILQ_FOREACH definition

Reported by Lawnstein Chan.
This commit is contained in:
Nick Mathewson 2011-06-22 11:22:35 -04:00
parent e23cda3dae
commit e934096490

View File

@ -313,10 +313,12 @@ struct event_config {
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
#endif #endif
#ifndef TAILQ_FOREACH
#define TAILQ_FOREACH(var, head, field) \ #define TAILQ_FOREACH(var, head, field) \
for ((var) = TAILQ_FIRST(head); \ for ((var) = TAILQ_FIRST(head); \
(var) != TAILQ_END(head); \ (var) != TAILQ_END(head); \
(var) = TAILQ_NEXT(var, field)) (var) = TAILQ_NEXT(var, field))
#endif
#ifndef TAILQ_INSERT_BEFORE #ifndef TAILQ_INSERT_BEFORE
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \