[PATCH 3.7-rc1] Fix kconfig failure on old environments.

2012-10-16 Thread Tetsuo Handa
>From af0876644f04eca9d59c96320447abb0af526079 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa 
Date: Tue, 16 Oct 2012 22:30:38 +0900
Subject: [PATCH 3.7-rc1] Fix kconfig failure on old environments.

Commit 95ac9b3b "menuconfig: Assign jump keys per-page instead of globally"
used macros which are available in "@(#)queue.h 8.5 (Berkeley) 8/20/94" but are
not available in "@(#)queue.h 8.3 (Berkeley) 12/13/93", making it impossible to
run one of kconfig targets on old environments.

This patch defines missing macros as needed.

Signed-off-by: Tetsuo Handa 
Cc: Benjamin Poirier 
Cc: Michal Marek 
---
 scripts/kconfig/expr.h |   43 +++
 1 file changed, 43 insertions(+)

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index bd2e098..1ec59f3 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -13,6 +13,49 @@ extern "C" {
 #include 
 #include 
 #include 
+#ifndef CIRCLEQ_HEAD_INITIALIZER
+#defineCIRCLEQ_HEAD_INITIALIZER(head)  
\
+   { (void *), (void *) }
+#endif
+#ifndef CIRCLEQ_FOREACH
+#defineCIRCLEQ_FOREACH(var, head, field)   
\
+   for ((var) = ((head)->cqh_first);   \
+   (var) != (const void *)(head);  \
+   (var) = ((var)->field.cqe_next))
+#endif
+#ifndef CIRCLEQ_FOREACH_REVERSE
+#defineCIRCLEQ_FOREACH_REVERSE(var, head, field)   
\
+   for ((var) = ((head)->cqh_last);\
+   (var) != (const void *)(head);  \
+   (var) = ((var)->field.cqe_prev))
+#endif
+#ifndef CIRCLEQ_EMPTY
+#defineCIRCLEQ_EMPTY(head) ((head)->cqh_first == (void 
*)(head))
+#endif
+#ifndef CIRCLEQ_FIRST
+#defineCIRCLEQ_FIRST(head) ((head)->cqh_first)
+#endif
+#ifndef CIRCLEQ_LAST
+#defineCIRCLEQ_LAST(head)  ((head)->cqh_last)
+#endif
+#ifndef CIRCLEQ_NEXT
+#defineCIRCLEQ_NEXT(elm, field)((elm)->field.cqe_next)
+#endif
+#ifndef CIRCLEQ_PREV
+#defineCIRCLEQ_PREV(elm, field)((elm)->field.cqe_prev)
+#endif
+#ifndef CIRCLEQ_LOOP_NEXT
+#define CIRCLEQ_LOOP_NEXT(head, elm, field)\
+   (((elm)->field.cqe_next == (void *)(head))  \
+   ? ((head)->cqh_first)   \
+   : (elm->field.cqe_next))
+#endif
+#ifndef CIRCLEQ_LOOP_PREV
+#define CIRCLEQ_LOOP_PREV(head, elm, field)\
+   (((elm)->field.cqe_prev == (void *)(head))  \
+   ? ((head)->cqh_last)\
+   : (elm->field.cqe_prev))
+#endif
 #ifndef __cplusplus
 #include 
 #endif
-- 
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3.7-rc1] Fix kconfig failure on old environments.

2012-10-16 Thread Tetsuo Handa
From af0876644f04eca9d59c96320447abb0af526079 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp
Date: Tue, 16 Oct 2012 22:30:38 +0900
Subject: [PATCH 3.7-rc1] Fix kconfig failure on old environments.

Commit 95ac9b3b menuconfig: Assign jump keys per-page instead of globally
used macros which are available in @(#)queue.h 8.5 (Berkeley) 8/20/94 but are
not available in @(#)queue.h 8.3 (Berkeley) 12/13/93, making it impossible to
run one of kconfig targets on old environments.

This patch defines missing macros as needed.

Signed-off-by: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp
Cc: Benjamin Poirier bpoir...@suse.de
Cc: Michal Marek mma...@suse.cz
---
 scripts/kconfig/expr.h |   43 +++
 1 file changed, 43 insertions(+)

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index bd2e098..1ec59f3 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -13,6 +13,49 @@ extern C {
 #include assert.h
 #include stdio.h
 #include sys/queue.h
+#ifndef CIRCLEQ_HEAD_INITIALIZER
+#defineCIRCLEQ_HEAD_INITIALIZER(head)  
\
+   { (void *)head, (void *)head }
+#endif
+#ifndef CIRCLEQ_FOREACH
+#defineCIRCLEQ_FOREACH(var, head, field)   
\
+   for ((var) = ((head)-cqh_first);   \
+   (var) != (const void *)(head);  \
+   (var) = ((var)-field.cqe_next))
+#endif
+#ifndef CIRCLEQ_FOREACH_REVERSE
+#defineCIRCLEQ_FOREACH_REVERSE(var, head, field)   
\
+   for ((var) = ((head)-cqh_last);\
+   (var) != (const void *)(head);  \
+   (var) = ((var)-field.cqe_prev))
+#endif
+#ifndef CIRCLEQ_EMPTY
+#defineCIRCLEQ_EMPTY(head) ((head)-cqh_first == (void 
*)(head))
+#endif
+#ifndef CIRCLEQ_FIRST
+#defineCIRCLEQ_FIRST(head) ((head)-cqh_first)
+#endif
+#ifndef CIRCLEQ_LAST
+#defineCIRCLEQ_LAST(head)  ((head)-cqh_last)
+#endif
+#ifndef CIRCLEQ_NEXT
+#defineCIRCLEQ_NEXT(elm, field)((elm)-field.cqe_next)
+#endif
+#ifndef CIRCLEQ_PREV
+#defineCIRCLEQ_PREV(elm, field)((elm)-field.cqe_prev)
+#endif
+#ifndef CIRCLEQ_LOOP_NEXT
+#define CIRCLEQ_LOOP_NEXT(head, elm, field)\
+   (((elm)-field.cqe_next == (void *)(head))  \
+   ? ((head)-cqh_first)   \
+   : (elm-field.cqe_next))
+#endif
+#ifndef CIRCLEQ_LOOP_PREV
+#define CIRCLEQ_LOOP_PREV(head, elm, field)\
+   (((elm)-field.cqe_prev == (void *)(head))  \
+   ? ((head)-cqh_last)\
+   : (elm-field.cqe_prev))
+#endif
 #ifndef __cplusplus
 #include stdbool.h
 #endif
-- 
1.7.9.5
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/