From: Martin Z. <co...@mz...> - 2010-01-18 23:03:28
|
Hi everybody, since SVN revision 1082, "lcd4linux" doesn't compile any more: In file included from plugin.h:28, from plugin_python.c:37: evaluator.h:45: error: expected identifier or ‘(’ before ‘__extension__’ If I comment the line 45 in "evaluator.h", however, the compile is successful. I don't understand the error message, so I can't fix it myself. Any ideas? I'm running Kubuntu Karmic 9.10 (kernel 2.6.31-17-generic) with gcc 4.4.1. Greetings from Germany, Martin -- www.mzuther.de www.radix-musik.de |
From: Martin Z. <mz...@mz...> - 2010-01-18 22:56:18
|
Hi everybody, since SVN revision 1082, "lcd4linux" doesn't compile any more: In file included from plugin.h:28, from plugin_python.c:37: evaluator.h:45: error: expected identifier or ‘(’ before ‘__extension__’ If I comment the line 45 in "evaluator.h", however, the compile is successful. I don't understand the error message, so I can't fix it myself. Any ideas? I'm running Kubuntu Karmic 9.10 (kernel 2.6.31-17-generic) with gcc 4.4.1. Greetings from Germany, Martin -- www.mzuther.de www.radix-musik.de |
From: Michael R. <mi...@re...> - 2010-01-19 08:44:07
|
Hi there, > since SVN revision 1082, "lcd4linux" doesn't compile any more: > > In file included from plugin.h:28, > from plugin_python.c:37: > evaluator.h:45: error: expected identifier or ‘(’ before > ‘__extension__’ > > If I comment the line 45 in "evaluator.h", however, the compile is > successful. I don't understand the error message, so I can't fix it > myself. Any ideas? Well, I can't reproduce the problem here. Probabyly due to the fact that I don't have Python-devel installed, so I never compile the python plugin. I suspect that python.h defines its own strndup(). Can you confirm this? bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Martin Z. <co...@mz...> - 2010-01-19 11:16:35
|
Hi Michael, you're correct, "lcd4linux" does compile without python support. Also, if I replace // #ifndef HAVE_STRNDUP with #if ! defined HAVE_STRNDUP && ! defined Py_PYTHON_H "lcd4linux" compiles with python support. This does not really help, though, as "Python.h" simply includes "string.h" which then adds the definition for "strndup". Therefore, changing the above line to #if ! defined HAVE_STRNDUP && ! defined _STRING_H also works. And I rather guess that _STRING_H is defined on most systems... Martin -- www.mzuther.de www.radix-musik.de |
From: Mattia Jona-L. <mat...@gm...> - 2010-01-19 11:41:12
|
Hi Michael and Martin The problem is simply that the file plugin_python.c does not include (as it should) the header config.h You should add #include "config.h" as the first header to include. In this way lcd4linux compiles as a charm. Bye! Mattia On Tue, Jan 19, 2010 at 12:16 PM, Martin Zuther <co...@mz...> wrote: > Hi Michael, > > you're correct, "lcd4linux" does compile without python support. Also, > if I replace > > // #ifndef HAVE_STRNDUP > > with > > #if ! defined HAVE_STRNDUP && ! defined Py_PYTHON_H > > "lcd4linux" compiles with python support. This does not really help, > though, as "Python.h" simply includes "string.h" which then adds the > definition for "strndup". Therefore, changing the above line to > > #if ! defined HAVE_STRNDUP && ! defined _STRING_H > > also works. And I rather guess that _STRING_H is defined on most systems... > > Martin > -- > www.mzuther.de > www.radix-musik.de > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Lcd4linux-devel mailing list > Lcd...@li... > https://lists.sourceforge.net/lists/listinfo/lcd4linux-devel > |
From: Martin Z. <co...@mz...> - 2010-01-19 12:47:37
|
Hi Mattia, thanks! You're right, "lcd4linux" compiles as a charm after making the change, and I have already committed this to SVN. Moreover, I have looked through the other plugins to made sure that all of them include "config.h". (They do. <g>) Do you think it would make sense to change "plugin_sample.c" from /* define the include files you need */ #include "config.h" #include <stdlib.h> #include <string.h> #include <ctype.h> /* these should always be included */ (...) to /* this file should always be included */ #include "config.h" /* define the include files you need */ #include <stdlib.h> #include <string.h> #include <ctype.h> /* these should always be included */ (...) In this way, everybody would see that "config.h" shouldn't be removed. Martin -- www.mzuther.de www.radix-musik.de |
From: Mattia Jona-L. <mat...@gm...> - 2010-01-19 13:57:09
|
Hi Martin, It definitely makes sense. Though it would be even better to put it in some general header like plugin.h. The configuration is not something "per plugin". Since all plugins include plugin.h, config.h would be included automatically in a natural way. In the same spirit it would make sense to put an include config.h in drv.h and widget.h. But this is, of course, a matter of taste. Bye! Mattia On Tue, Jan 19, 2010 at 1:31 PM, Martin Zuther <co...@mz...> wrote: > Hi Mattia, > > thanks! You're right, "lcd4linux" compiles as a charm after making the > change, and I have already committed this to SVN. Moreover, I have > looked through the other plugins to made sure that all of them include > "config.h". (They do. <g>) > > Do you think it would make sense to change "plugin_sample.c" from > > /* define the include files you need */ > #include "config.h" > > #include <stdlib.h> > #include <string.h> > #include <ctype.h> > > /* these should always be included */ > (...) > > to > > /* this file should always be included */ > #include "config.h" > > /* define the include files you need */ > #include <stdlib.h> > #include <string.h> > #include <ctype.h> > > /* these should always be included */ > (...) > > In this way, everybody would see that "config.h" shouldn't be removed. > > Martin > -- > www.mzuther.de > www.radix-musik.de > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Lcd4linux-devel mailing list > Lcd...@li... > https://lists.sourceforge.net/lists/listinfo/lcd4linux-devel > |
From: Martin Z. <co...@mz...> - 2010-01-19 23:13:52
|
Hi Mattia, as you suggested, I have added "config.h" to "plugin.h" and adapted "plugin.c" and "plugin_sample.c". I *might* do this for all 44 plugins if I feel particularly bored, but on the other hand, I might as well not. ;) Martin -- www.mzuther.de www.radix-musik.de |
From: Mattia Jona-L. <mat...@gm...> - 2010-01-20 10:17:45
|
Hi Martin I could do this this if I had writing permission to the repository. And also modify drv.h and widget.h accordingly. Does Michael agree on giving me such permission? Best, Mattia On Wed, Jan 20, 2010 at 12:13 AM, Martin Zuther <co...@mz...> wrote: > Hi Mattia, > > as you suggested, I have added "config.h" to "plugin.h" and adapted > "plugin.c" and "plugin_sample.c". I *might* do this for all 44 plugins if I > feel particularly bored, but on the other hand, I might as well not. ;) > > Martin > -- > www.mzuther.de > www.radix-musik.de > > |
From: Martin Z. <co...@mz...> - 2010-01-20 22:17:08
|
Hi Mattia! > I could do this this if I had writing permission to the repository. Mind you that changing all the plugins is just a cosmetic change. If it was important, I would have done so already... ;) Martin -- www.mzuther.de www.radix-musik.de |
From: Michael R. <mi...@re...> - 2010-01-21 04:57:11
|
Martin Zuther schrieb: > Hi Mattia! > > > I could do this this if I had writing permission to the repository. > > Mind you that changing all the plugins is just a cosmetic change. If it > was important, I would have done so already... ;) Already done. There should be no *.c file that does not include config.h bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |