Merge pull request #27 from pallas/master

Fix event_dlist definition when sys/queue not included
This commit is contained in:
Nick Mathewson 2012-11-16 07:42:17 -08:00
commit 3f27db9d92

View File

@ -91,7 +91,15 @@ struct { \
struct type *le_next; /* next element */ \ struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \ struct type **le_prev; /* address of previous next element */ \
} }
#endif /* !TAILQ_ENTRY */ #endif /* !LIST_ENTRY */
#ifndef LIST_HEAD
#define EVENT_DEFINED_LISTHEAD_
#define LIST_HEAD(name, type) \
struct name { \
struct type *lh_first; /* first element */ \
}
#endif /* !LIST_HEAD */
struct event_callback { struct event_callback {
TAILQ_ENTRY(event_callback) evcb_active_next; TAILQ_ENTRY(event_callback) evcb_active_next;
@ -150,13 +158,15 @@ TAILQ_HEAD (event_list, event);
#undef TAILQ_HEAD #undef TAILQ_HEAD
#endif #endif
LIST_HEAD (event_dlist, event);
#ifdef EVENT_DEFINED_LISTENTRY_ #ifdef EVENT_DEFINED_LISTENTRY_
#undef LIST_ENTRY #undef LIST_ENTRY
struct event_dlist; #endif
#undef EVENT_DEFINED_LISTENTRY_
#else #ifdef EVENT_DEFINED_LISTHEAD_
LIST_HEAD (event_dlist, event); #undef LIST_HEAD
#endif /* EVENT_DEFINED_LISTENTRY_ */ #endif
#ifdef __cplusplus #ifdef __cplusplus
} }