aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorSUZUKI, Shinsuke <suz@kame.net>2006-09-02 08:00:25 +0000
committerSUZUKI, Shinsuke <suz@kame.net>2006-09-02 08:00:25 +0000
commita81d6601b213f657821f80bd6f257545647574a0 (patch)
tree765faa8d45b5512188ad7cf46df6d2b33e1f658c /common.h
parent26ff90dadfa215eaeb5008bd6d50fe1db5969a13 (diff)
added a configure check routine to automatically detect a difference(*1) in
TAILQ_FOREACH_REVERSE macros. (Suggested by Brute STEVANT) *1) Some OS (*BSD) adopts the following definition, #define TAILQ_FOREACH_REVERSE(var, head, headname, field) but others (MacOS-X, old OpenBSD) adopts the following definition #define TAILQ_FOREACH_REVERSE(var, head, field, headname)
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.h b/common.h
index 194829d..c10b65d 100644
--- a/common.h
+++ b/common.h
@@ -84,6 +84,9 @@
(var); \
(var) = TAILQ_NEXT((var), field))
#endif
+#ifdef HAVE_TAILQ_FOREACH_REVERSE_OLD
+#undef TAILQ_FOREACH_REVERSE
+#endif
#ifndef TAILQ_FOREACH_REVERSE
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for ((var) = TAILQ_LAST((head), headname); \