Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-23 Thread Yann E. MORIN
Christoph, All,

On Tuesday 23 October 2012 Christoph Hellwig wrote:
> On Thu, Oct 18, 2012 at 07:33:45PM +0200, Yann E. MORIN wrote:
> > Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
> > They were removed in Y2000 from FreeBSD:
> > http://svnweb.freebsd.org/base?view=revision=70469
> > 
> > The reason was that TAILQ are perfectly capable of doing the exact
> > same things:
> > 
> > http://www.mavetju.org/mail/view_thread.php?list=freebsd-arch=915145=yes
> > 
> > (Thank Yaakov for the pointers!)
> > 
> > So, switch to using TAILQ instead, which are more portable.
> 
> Why not use the kernels list.h?

First, we can't use linux/list.h because it can't be included from userspace.
Second, it would not be convenient for those that use kconfig outside the
Linux kernel (thiord-party projects, eg. buildroot, uClibc, busybox...):
http://marc.info/?l=linux-kbuild=135065985609068=2

Also, this patch of mine is deprecated; Benjamin has posted another patch
which makes use of a stripped-down list.h, partially copied from linux/list.h:
http://marc.info/?t=13508117951=1=4

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-23 Thread Christoph Hellwig
On Thu, Oct 18, 2012 at 07:33:45PM +0200, Yann E. MORIN wrote:
> Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
> They were removed in Y2000 from FreeBSD:
> http://svnweb.freebsd.org/base?view=revision=70469
> 
> The reason was that TAILQ are perfectly capable of doing the exact
> same things:
> 
> http://www.mavetju.org/mail/view_thread.php?list=freebsd-arch=915145=yes
> 
> (Thank Yaakov for the pointers!)
> 
> So, switch to using TAILQ instead, which are more portable.

Why not use the kernels list.h?

--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-23 Thread Christoph Hellwig
On Thu, Oct 18, 2012 at 07:33:45PM +0200, Yann E. MORIN wrote:
 Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
 They were removed in Y2000 from FreeBSD:
 http://svnweb.freebsd.org/base?view=revisionrevision=70469
 
 The reason was that TAILQ are perfectly capable of doing the exact
 same things:
 
 http://www.mavetju.org/mail/view_thread.php?list=freebsd-archid=915145thread=yes
 
 (Thank Yaakov for the pointers!)
 
 So, switch to using TAILQ instead, which are more portable.

Why not use the kernels list.h?

--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-23 Thread Yann E. MORIN
Christoph, All,

On Tuesday 23 October 2012 Christoph Hellwig wrote:
 On Thu, Oct 18, 2012 at 07:33:45PM +0200, Yann E. MORIN wrote:
  Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
  They were removed in Y2000 from FreeBSD:
  http://svnweb.freebsd.org/base?view=revisionrevision=70469
  
  The reason was that TAILQ are perfectly capable of doing the exact
  same things:
  
  http://www.mavetju.org/mail/view_thread.php?list=freebsd-archid=915145thread=yes
  
  (Thank Yaakov for the pointers!)
  
  So, switch to using TAILQ instead, which are more portable.
 
 Why not use the kernels list.h?

First, we can't use linux/list.h because it can't be included from userspace.
Second, it would not be convenient for those that use kconfig outside the
Linux kernel (thiord-party projects, eg. buildroot, uClibc, busybox...):
http://marc.info/?l=linux-kbuildm=135065985609068w=2

Also, this patch of mine is deprecated; Benjamin has posted another patch
which makes use of a stripped-down list.h, partially copied from linux/list.h:
http://marc.info/?t=13508117951r=1w=4

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-20 Thread Yann E. MORIN
Tetuso, All,

On Saturday 20 October 2012 Tetsuo Handa wrote:
> Michal Marek wrote:
> > On 19.10.2012 14:10, Tetsuo Handa wrote:
> > > Yann E. MORIN wrote:
> > >> So, switch to using TAILQ instead, which are more portable.
> > [...]
> > > Excuse me, but your patch does not solve my problem because kconfig 
> > > started
> > > using macros which does not exist in "@(#)queue.h 8.3 (Berkeley) 
> > > 12/13/93".
> > > Kconfig still fails after applying your patch:
> > > 
> > >   HOSTCC  scripts/kconfig/mconf.o
> > > scripts/kconfig/mconf.c: In function `update_text':
> > > scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
> > > `TAILQ_FOREACH'
> > [...]
> > > scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
> > > `TAILQ_HEAD_INITIALIZER'
> > > 
> > > So, would you add something which looks like "sed -e 's/CIRCLEQ/TAILQ/g'" 
> > > upon
> > > https://lkml.org/lkml/2012/10/16/274 ?
> > 
> > Could you reduce that patch to not copy all of queue.h?
> > TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
> > variable definitions, and we do not need stuff like
> > TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
> > operations under a different name, so that people don't accidentally use
> > other macros that are missing in old queue.h revisions.
> > 
> > Michal
> > 
> 
> I'm fine to manually add missing macros to /usr/include/sys/queue.h of
> "@(#)queue.h 8.3 (Berkeley) 12/13/93" in my environment instead of adding
> define-as-needed lines to scripts/kconfig/expr.h, for missing macros are
> available with that of "@(#)queue.h 8.5 (Berkeley) 8/20/94".

Are you OK with this s/CIRCLEQ/TAILQ/ patch, then?
http://marc.info/?l=linux-kbuild=135058165015518=2

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-20 Thread Tetsuo Handa
Michal Marek wrote:
> On 19.10.2012 14:10, Tetsuo Handa wrote:
> > Yann E. MORIN wrote:
> >> So, switch to using TAILQ instead, which are more portable.
> [...]
> > Excuse me, but your patch does not solve my problem because kconfig started
> > using macros which does not exist in "@(#)queue.h 8.3 (Berkeley) 12/13/93".
> > Kconfig still fails after applying your patch:
> > 
> >   HOSTCC  scripts/kconfig/mconf.o
> > scripts/kconfig/mconf.c: In function `update_text':
> > scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
> > `TAILQ_FOREACH'
> [...]
> > scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
> > `TAILQ_HEAD_INITIALIZER'
> > 
> > So, would you add something which looks like "sed -e 's/CIRCLEQ/TAILQ/g'" 
> > upon
> > https://lkml.org/lkml/2012/10/16/274 ?
> 
> Could you reduce that patch to not copy all of queue.h?
> TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
> variable definitions, and we do not need stuff like
> TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
> operations under a different name, so that people don't accidentally use
> other macros that are missing in old queue.h revisions.
> 
> Michal
> 

I'm fine to manually add missing macros to /usr/include/sys/queue.h of
"@(#)queue.h 8.3 (Berkeley) 12/13/93" in my environment instead of adding
define-as-needed lines to scripts/kconfig/expr.h, for missing macros are
available with that of "@(#)queue.h 8.5 (Berkeley) 8/20/94".
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-20 Thread Tetsuo Handa
Michal Marek wrote:
 On 19.10.2012 14:10, Tetsuo Handa wrote:
  Yann E. MORIN wrote:
  So, switch to using TAILQ instead, which are more portable.
 [...]
  Excuse me, but your patch does not solve my problem because kconfig started
  using macros which does not exist in @(#)queue.h 8.3 (Berkeley) 12/13/93.
  Kconfig still fails after applying your patch:
  
HOSTCC  scripts/kconfig/mconf.o
  scripts/kconfig/mconf.c: In function `update_text':
  scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
  `TAILQ_FOREACH'
 [...]
  scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
  `TAILQ_HEAD_INITIALIZER'
  
  So, would you add something which looks like sed -e 's/CIRCLEQ/TAILQ/g' 
  upon
  https://lkml.org/lkml/2012/10/16/274 ?
 
 Could you reduce that patch to not copy all of queue.h?
 TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
 variable definitions, and we do not need stuff like
 TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
 operations under a different name, so that people don't accidentally use
 other macros that are missing in old queue.h revisions.
 
 Michal
 

I'm fine to manually add missing macros to /usr/include/sys/queue.h of
@(#)queue.h 8.3 (Berkeley) 12/13/93 in my environment instead of adding
define-as-needed lines to scripts/kconfig/expr.h, for missing macros are
available with that of @(#)queue.h 8.5 (Berkeley) 8/20/94.
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-20 Thread Yann E. MORIN
Tetuso, All,

On Saturday 20 October 2012 Tetsuo Handa wrote:
 Michal Marek wrote:
  On 19.10.2012 14:10, Tetsuo Handa wrote:
   Yann E. MORIN wrote:
   So, switch to using TAILQ instead, which are more portable.
  [...]
   Excuse me, but your patch does not solve my problem because kconfig 
   started
   using macros which does not exist in @(#)queue.h 8.3 (Berkeley) 
   12/13/93.
   Kconfig still fails after applying your patch:
   
 HOSTCC  scripts/kconfig/mconf.o
   scripts/kconfig/mconf.c: In function `update_text':
   scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
   `TAILQ_FOREACH'
  [...]
   scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
   `TAILQ_HEAD_INITIALIZER'
   
   So, would you add something which looks like sed -e 's/CIRCLEQ/TAILQ/g' 
   upon
   https://lkml.org/lkml/2012/10/16/274 ?
  
  Could you reduce that patch to not copy all of queue.h?
  TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
  variable definitions, and we do not need stuff like
  TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
  operations under a different name, so that people don't accidentally use
  other macros that are missing in old queue.h revisions.
  
  Michal
  
 
 I'm fine to manually add missing macros to /usr/include/sys/queue.h of
 @(#)queue.h 8.3 (Berkeley) 12/13/93 in my environment instead of adding
 define-as-needed lines to scripts/kconfig/expr.h, for missing macros are
 available with that of @(#)queue.h 8.5 (Berkeley) 8/20/94.

Are you OK with this s/CIRCLEQ/TAILQ/ patch, then?
http://marc.info/?l=linux-kbuildm=135058165015518w=2

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Yann E. MORIN
Tetsuo, Michal, All,

On Friday 19 October 2012 Tetsuo Handa wrote:
> Yann E. MORIN wrote:
> > Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
[--SNIP--]
> > So, switch to using TAILQ instead, which are more portable.
[--SNIP--]
> Excuse me, but your patch does not solve my problem because kconfig started
> using macros which does not exist in "@(#)queue.h 8.3 (Berkeley) 12/13/93".

Whoa. That's old... :-/

Currently, kconfig uses (CIRCLEQ or TAILQ)

> Kconfig still fails after applying your patch:
[--SNIP--]
> So, would you add something which looks like "sed -e 's/CIRCLEQ/TAILQ/g'" upon
> https://lkml.org/lkml/2012/10/16/274 ?

Sorry, I did not see you had posted a patch.

Basically, I don't care what solution we choose. Using TAILQ looks like
being not the solution. So, here are the known options:
1-  Michal pointed to tools/firewire/list.h, but those are different from
the CIRCLEQ/TAILQ, and switching is not easy (at least for me after a
quick glance);

1b- note also that drivers/scsi/aic7xxx/queue.h has all of both the CIRCLEQ
and TAILQ macros we're interested in, too, and it looks like it can be
used out of the kernel (eg. for userland);

2-  carry the parts of CIRCLEQ (or TAILQ) that we need, and use them if
the system's sys/queue.h does not provide them, as Tetsuo proposed;

3-  carry the parts of CIRCLEQ (or TAILQ) that we need, and do not rely
on the system's sys/queue.h to provide them at all.


Michal, what do you think would be the best route to go, to:
1- get a fix in 3.7 ?
2- if the fix for 3.7 is just a workaround, a proper fix for 3.8 ?

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Michal Marek
On 19.10.2012 14:10, Tetsuo Handa wrote:
> Yann E. MORIN wrote:
>> So, switch to using TAILQ instead, which are more portable.
[...]
> Excuse me, but your patch does not solve my problem because kconfig started
> using macros which does not exist in "@(#)queue.h 8.3 (Berkeley) 12/13/93".
> Kconfig still fails after applying your patch:
> 
>   HOSTCC  scripts/kconfig/mconf.o
> scripts/kconfig/mconf.c: In function `update_text':
> scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
> `TAILQ_FOREACH'
[...]
> scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
> `TAILQ_HEAD_INITIALIZER'
> 
> So, would you add something which looks like "sed -e 's/CIRCLEQ/TAILQ/g'" upon
> https://lkml.org/lkml/2012/10/16/274 ?

Could you reduce that patch to not copy all of queue.h?
TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
variable definitions, and we do not need stuff like
TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
operations under a different name, so that people don't accidentally use
other macros that are missing in old queue.h revisions.

Michal
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Tetsuo Handa
Yann E. MORIN wrote:
> Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
> They were removed in Y2000 from FreeBSD:
> http://svnweb.freebsd.org/base?view=revision=70469
> 
> The reason was that TAILQ are perfectly capable of doing the exact
> same things:
> 
> http://www.mavetju.org/mail/view_thread.php?list=freebsd-arch=915145=yes
> 
> (Thank Yaakov for the pointers!)
> 
> So, switch to using TAILQ instead, which are more portable.
> 
> Reported-by: Tetsuo Handa 
> Reported-by: Benjamin Poirier 
> Signed-off-by: "Yann E. MORIN" 
> Cc: Yaakov Selkowitz 
> ---
>  scripts/kconfig/expr.h  |4 ++--
>  scripts/kconfig/mconf.c |4 ++--
>  scripts/kconfig/menu.c  |6 +++---
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
Excuse me, but your patch does not solve my problem because kconfig started
using macros which does not exist in "@(#)queue.h 8.3 (Berkeley) 12/13/93".
Kconfig still fails after applying your patch:

  HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c: In function `update_text':
scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
`TAILQ_FOREACH'
scripts/kconfig/mconf.c:326: error: `entries' undeclared (first use in this 
function)
scripts/kconfig/mconf.c:326: error: (Each undeclared identifier is reported 
only once
scripts/kconfig/mconf.c:326: error: for each function it appears in.)
scripts/kconfig/mconf.c:326: error: syntax error before '{' token
scripts/kconfig/mconf.c:333: error: `header' undeclared (first use in this 
function)
scripts/kconfig/mconf.c: At top level:
scripts/kconfig/mconf.c:343: error: syntax error before '}' token
scripts/kconfig/mconf.c: In function `search_conf':
scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
`TAILQ_HEAD_INITIALIZER'
scripts/kconfig/mconf.c:378: error: invalid initializer
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2

So, would you add something which looks like "sed -e 's/CIRCLEQ/TAILQ/g'" upon
https://lkml.org/lkml/2012/10/16/274 ?
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Yaakov (Cygwin/X)
On Thu, 2012-10-18 at 20:59 +0200, Yann E. MORIN wrote:
> On Thursday 18 October 2012 Yaakov (Cygwin/X) wrote:
> > Tested-by: Yaakov Selkowitz 
> 
> Out of curiosity: did you test on Cygwin?

Yes, of course.


Yaakov
Cygwin Ports


--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Yaakov (Cygwin/X)
On Thu, 2012-10-18 at 20:59 +0200, Yann E. MORIN wrote:
 On Thursday 18 October 2012 Yaakov (Cygwin/X) wrote:
  Tested-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
 
 Out of curiosity: did you test on Cygwin?

Yes, of course.


Yaakov
Cygwin Ports


--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Tetsuo Handa
Yann E. MORIN wrote:
 Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
 They were removed in Y2000 from FreeBSD:
 http://svnweb.freebsd.org/base?view=revisionrevision=70469
 
 The reason was that TAILQ are perfectly capable of doing the exact
 same things:
 
 http://www.mavetju.org/mail/view_thread.php?list=freebsd-archid=915145thread=yes
 
 (Thank Yaakov for the pointers!)
 
 So, switch to using TAILQ instead, which are more portable.
 
 Reported-by: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp
 Reported-by: Benjamin Poirier bpoir...@suse.de
 Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
 Cc: Yaakov Selkowitz yselkow...@gmail.com
 ---
  scripts/kconfig/expr.h  |4 ++--
  scripts/kconfig/mconf.c |4 ++--
  scripts/kconfig/menu.c  |6 +++---
  3 files changed, 7 insertions(+), 7 deletions(-)
 
Excuse me, but your patch does not solve my problem because kconfig started
using macros which does not exist in @(#)queue.h 8.3 (Berkeley) 12/13/93.
Kconfig still fails after applying your patch:

  HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c: In function `update_text':
scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
`TAILQ_FOREACH'
scripts/kconfig/mconf.c:326: error: `entries' undeclared (first use in this 
function)
scripts/kconfig/mconf.c:326: error: (Each undeclared identifier is reported 
only once
scripts/kconfig/mconf.c:326: error: for each function it appears in.)
scripts/kconfig/mconf.c:326: error: syntax error before '{' token
scripts/kconfig/mconf.c:333: error: `header' undeclared (first use in this 
function)
scripts/kconfig/mconf.c: At top level:
scripts/kconfig/mconf.c:343: error: syntax error before '}' token
scripts/kconfig/mconf.c: In function `search_conf':
scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
`TAILQ_HEAD_INITIALIZER'
scripts/kconfig/mconf.c:378: error: invalid initializer
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2

So, would you add something which looks like sed -e 's/CIRCLEQ/TAILQ/g' upon
https://lkml.org/lkml/2012/10/16/274 ?
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Michal Marek
On 19.10.2012 14:10, Tetsuo Handa wrote:
 Yann E. MORIN wrote:
 So, switch to using TAILQ instead, which are more portable.
[...]
 Excuse me, but your patch does not solve my problem because kconfig started
 using macros which does not exist in @(#)queue.h 8.3 (Berkeley) 12/13/93.
 Kconfig still fails after applying your patch:
 
   HOSTCC  scripts/kconfig/mconf.o
 scripts/kconfig/mconf.c: In function `update_text':
 scripts/kconfig/mconf.c:326: warning: implicit declaration of function 
 `TAILQ_FOREACH'
[...]
 scripts/kconfig/mconf.c:378: warning: implicit declaration of function 
 `TAILQ_HEAD_INITIALIZER'
 
 So, would you add something which looks like sed -e 's/CIRCLEQ/TAILQ/g' upon
 https://lkml.org/lkml/2012/10/16/274 ?

Could you reduce that patch to not copy all of queue.h?
TAILQ_HEAD_INITIALIZER can be replaced by a TAILQ_INIT() call after
variable definitions, and we do not need stuff like
TAILQ_FOREACH_REVERSE. The other option is to reimplement the needed
operations under a different name, so that people don't accidentally use
other macros that are missing in old queue.h revisions.

Michal
--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-19 Thread Yann E. MORIN
Tetsuo, Michal, All,

On Friday 19 October 2012 Tetsuo Handa wrote:
 Yann E. MORIN wrote:
  Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
[--SNIP--]
  So, switch to using TAILQ instead, which are more portable.
[--SNIP--]
 Excuse me, but your patch does not solve my problem because kconfig started
 using macros which does not exist in @(#)queue.h 8.3 (Berkeley) 12/13/93.

Whoa. That's old... :-/

Currently, kconfig uses (CIRCLEQ or TAILQ)

 Kconfig still fails after applying your patch:
[--SNIP--]
 So, would you add something which looks like sed -e 's/CIRCLEQ/TAILQ/g' upon
 https://lkml.org/lkml/2012/10/16/274 ?

Sorry, I did not see you had posted a patch.

Basically, I don't care what solution we choose. Using TAILQ looks like
being not the solution. So, here are the known options:
1-  Michal pointed to tools/firewire/list.h, but those are different from
the CIRCLEQ/TAILQ, and switching is not easy (at least for me after a
quick glance);

1b- note also that drivers/scsi/aic7xxx/queue.h has all of both the CIRCLEQ
and TAILQ macros we're interested in, too, and it looks like it can be
used out of the kernel (eg. for userland);

2-  carry the parts of CIRCLEQ (or TAILQ) that we need, and use them if
the system's sys/queue.h does not provide them, as Tetsuo proposed;

3-  carry the parts of CIRCLEQ (or TAILQ) that we need, and do not rely
on the system's sys/queue.h to provide them at all.


Michal, what do you think would be the best route to go, to:
1- get a fix in 3.7 ?
2- if the fix for 3.7 is just a workaround, a proper fix for 3.8 ?

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-18 Thread Yann E. MORIN
Yaakov, All,

On Thursday 18 October 2012 Yaakov (Cygwin/X) wrote:
> On Thu, 2012-10-18 at 19:33 +0200, Yann E. MORIN wrote:
> > Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
> > They were removed in Y2000 from FreeBSD:
> > http://svnweb.freebsd.org/base?view=revision=70469
> > 
> > The reason was that TAILQ are perfectly capable of doing the exact
> > same things:
> > 
> > http://www.mavetju.org/mail/view_thread.php?list=freebsd-arch=915145=yes
> > 
> > (Thank Yaakov for the pointers!)
> 
> And thank you again for the heads-up.
> 
> > So, switch to using TAILQ instead, which are more portable.
> > 
> > Reported-by: Tetsuo Handa 
> > Reported-by: Benjamin Poirier 
> > Signed-off-by: "Yann E. MORIN" 
> 
> Tested-by: Yaakov Selkowitz 

Out of curiosity: did you test on Cygwin?

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 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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-18 Thread Yaakov (Cygwin/X)
On Thu, 2012-10-18 at 19:33 +0200, Yann E. MORIN wrote:
> Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
> They were removed in Y2000 from FreeBSD:
> http://svnweb.freebsd.org/base?view=revision=70469
> 
> The reason was that TAILQ are perfectly capable of doing the exact
> same things:
> 
> http://www.mavetju.org/mail/view_thread.php?list=freebsd-arch=915145=yes
> 
> (Thank Yaakov for the pointers!)

And thank you again for the heads-up.

> So, switch to using TAILQ instead, which are more portable.
> 
> Reported-by: Tetsuo Handa 
> Reported-by: Benjamin Poirier 
> Signed-off-by: "Yann E. MORIN" 

Tested-by: Yaakov Selkowitz 


--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-18 Thread Yaakov (Cygwin/X)
On Thu, 2012-10-18 at 19:33 +0200, Yann E. MORIN wrote:
 Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
 They were removed in Y2000 from FreeBSD:
 http://svnweb.freebsd.org/base?view=revisionrevision=70469
 
 The reason was that TAILQ are perfectly capable of doing the exact
 same things:
 
 http://www.mavetju.org/mail/view_thread.php?list=freebsd-archid=915145thread=yes
 
 (Thank Yaakov for the pointers!)

And thank you again for the heads-up.

 So, switch to using TAILQ instead, which are more portable.
 
 Reported-by: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp
 Reported-by: Benjamin Poirier bpoir...@suse.de
 Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr

Tested-by: Yaakov Selkowitz yselkow...@users.sourceforge.net


--
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/


Re: [PATCH] kconfig/menuconfig: use TAILQ instead of CIRCLEQ

2012-10-18 Thread Yann E. MORIN
Yaakov, All,

On Thursday 18 October 2012 Yaakov (Cygwin/X) wrote:
 On Thu, 2012-10-18 at 19:33 +0200, Yann E. MORIN wrote:
  Some systems (eg. Cygwin, FreeBSD) are missing the CIRCLEQ macros.
  They were removed in Y2000 from FreeBSD:
  http://svnweb.freebsd.org/base?view=revisionrevision=70469
  
  The reason was that TAILQ are perfectly capable of doing the exact
  same things:
  
  http://www.mavetju.org/mail/view_thread.php?list=freebsd-archid=915145thread=yes
  
  (Thank Yaakov for the pointers!)
 
 And thank you again for the heads-up.
 
  So, switch to using TAILQ instead, which are more portable.
  
  Reported-by: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp
  Reported-by: Benjamin Poirier bpoir...@suse.de
  Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
 
 Tested-by: Yaakov Selkowitz yselkow...@users.sourceforge.net

Out of curiosity: did you test on Cygwin?

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 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/