[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201210210019.04263.yann.morin.1998@free.fr>
Date: Sun, 21 Oct 2012 00:19:03 +0200
From: "Yann E. MORIN" <yann.morin.1998@...e.fr>
To: linux-kbuild@...r.kernel.org
Cc: Benjamin Poirier <benjamin.poirier@...il.com>,
Michal Marek <mmarek@...e.cz>, Jean Sacren <sakiwit@...il.com>,
Arnaud Lacombe <lacombar@...il.com>,
Wang YanQing <udknight@...il.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Davidlohr Bueso <dave@....org>, linux-kernel@...r.kernel.org,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Yaakov Selkowitz <yselkowitz@...il.com>
Subject: Re: [PATCH] menuconfig: Replace CIRCLEQ by list_head-style lists.
Benjamin, All,
On Saturday 20 October 2012 Benjamin Poirier wrote:
> From: Benjamin Poirier <bpoirier@...e.de>
>
> sys/queue.h and CIRCLEQ in particular have proven to cause portability
> problems (reported on Debian Sarge, Cygwin and FreeBSD)
>
> Reported-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> Signed-off-by: Benjamin Poirier <bpoirier@...e.de>
Sorry for my earlier optimistic reply, but...
While menuconfig got fixed with this patch, xconfig is now broken:
First issue:
In file included from /home/ymorin/dev/linux/scripts/kconfig/expr.h:15,
from /home/ymorin/dev/linux/scripts/kconfig/lkc.h:9,
from /home/ymorin/dev/linux/scripts/kconfig/qconf.cc:45:
/home/ymorin/dev/linux/scripts/kconfig/list.h:8:1: warning: "offsetof"
redefined
In file included from /usr/include/_G_config.h:15,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:75,
from /usr/include/qt4/QtCore/qtextstream.h:57,
from /usr/include/qt4/Qt3Support/q3mainwindow.h:47,
from /home/ymorin/dev/linux/scripts/kconfig/qconf.cc:19:
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h:411:1: warning: this
is the location of the previous definition
[--SNIP--]
> diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h
> new file mode 100644
> index 0000000..934bdba
> --- /dev/null
> +++ b/scripts/kconfig/list.h
> @@ -0,0 +1,90 @@
> +#ifndef LIST_H
> +#define LIST_H
> +
> +/*
> + * Copied from include/linux/...
> + */
> +
> +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
We could #include <stddef.h>, but then we may end up with issues with
old systems (which we are trying to fix!). I suggest we enclose the
definition between a
#ifndef offsetof
...
#endif
Second issue:
We have further issues with some variable names:
/home/ymorin/dev/linux/scripts/kconfig/list.h:69: error: expected ‘,’ or
‘...’ before ‘new’
[--SNIP--]
> +static inline void __list_add(struct list_head *new,
'new' is a reserved key-word in C++, and xconfig is using qconf, which is
written in C++.
I 'd suggest to:
1- rename the variable
2- enclose the whole header in:
#ifdef __cplusplus
extern "C" {
#endif
[.....]
#ifdef __cplusplus
}
#endif
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists