summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-04-28 15:00:18 +0200
committerunknown <knielsen@knielsen-hq.org>2010-04-28 15:00:18 +0200
commitc3a2a2d771272806e1d9828a03627774d9eb3e8a (patch)
tree85bc9aba7e705a39eaaf46a1f47b635a9e282940 /extra
parentb1e00b6be81c80b09d11085d77d86978e26df988 (diff)
downloadmariadb-git-c3a2a2d771272806e1d9828a03627774d9eb3e8a.tar.gz
(Hopefully) better fix for Windows warning on redefined TAILQ_EMPTY;
the previous attempt broke build on Debian4.
Diffstat (limited to 'extra')
-rw-r--r--extra/libevent/event-internal.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/libevent/event-internal.h b/extra/libevent/event-internal.h
index c24c784d866..59a089ddec4 100644
--- a/extra/libevent/event-internal.h
+++ b/extra/libevent/event-internal.h
@@ -69,14 +69,17 @@ struct event_base {
};
/* 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
Copyright (c) 1991, 1993, The Regents of the University of California.
All rights reserved.
*/
+#ifndef TAILQ_EMPTY
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_END(head) NULL
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+#endif /* TAILQ_EMPTY */
+#ifndef HAVE_TAILQFOREACH
#define TAILQ_FOREACH(var, head, field) \
for((var) = TAILQ_FIRST(head); \
(var) != TAILQ_END(head); \