Always define missing TAILQ functions from sys/queue.h

On both Android and Ubuntu machines, TAILQ_END is not defined.  This
header also does not seem to be part of standard BSD sys/queue.h

Fix this by always defining missing TAILQ_ macros rather than
conditioning on a particular macro.

Fixes #267
This commit is contained in:
Christopher Wiley 2015-07-24 08:42:06 -07:00 committed by Azat Khuzhin
parent fd36647af1
commit 2828bdb980

View File

@ -368,7 +368,6 @@ struct event_config {
}; };
/* Internal use only: Functions that might be missing from <sys/queue.h> */ /* Internal use only: Functions that might be missing from <sys/queue.h> */
#if defined(EVENT__HAVE_SYS_QUEUE_H) && !defined(EVENT__HAVE_TAILQFOREACH)
#ifndef TAILQ_FIRST #ifndef TAILQ_FIRST
#define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_FIRST(head) ((head)->tqh_first)
#endif #endif
@ -394,7 +393,6 @@ struct event_config {
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
} while (0) } while (0)
#endif #endif
#endif /* TAILQ_FOREACH */
#define N_ACTIVE_CALLBACKS(base) \ #define N_ACTIVE_CALLBACKS(base) \
((base)->event_count_active) ((base)->event_count_active)