Commit c3a2a2d7 authored by unknown's avatar unknown

(Hopefully) better fix for Windows warning on redefined TAILQ_EMPTY;

the previous attempt broke build on Debian4.
parent b1e00b6b
...@@ -69,14 +69,17 @@ struct event_base { ...@@ -69,14 +69,17 @@ struct event_base {
}; };
/* Internal use only: Functions that might be missing from <sys/queue.h> */ /* Internal use only: Functions that might be missing from <sys/queue.h> */
#ifndef HAVE_TAILQFOREACH
/* These following macros are copied from BSD sys/queue.h /* These following macros are copied from BSD sys/queue.h
Copyright (c) 1991, 1993, The Regents of the University of California. Copyright (c) 1991, 1993, The Regents of the University of California.
All rights reserved. All rights reserved.
*/ */
#ifndef TAILQ_EMPTY
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_END(head) NULL #define TAILQ_END(head) NULL
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
#endif /* TAILQ_EMPTY */
#ifndef HAVE_TAILQFOREACH
#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); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment