[Lcdproc] configfile.c breaks on Mac OS X due to nested function

Eric Pooch epooch at cox.net
Tue Feb 24 03:38:21 UTC 2009


I am pretty sure this has been a non-issue for almost a year.  I am  
pretty sure  the nested functions were removed a while ago.

--Eric

On Feb 23, 2009, at 9:32 AM, Markus Dolze wrote:

> Erik Hansen reported this as a SF tracker event:
>
> --- quote begin ---
>
> Nested functions have been disabled by Mac OS X Developer tools -- gcc
> 4.0.1. As a result, compilation of configfile.c fails due to the  
> following
> code:
>
> int config_read_string(const char *sectionname, const char *str)
> /* All the config parameters are placed in the given section in  
> memory.*/
> {
> int pos = 0;
> section *s;
>
> /* We use a nested fuction to transfer the characters from buffer
> to parser*/
> char get_next_char() {
> return str[pos++];
> }
>
> if ((s = find_section(sectionname)) == NULL)
> s = add_section(sectionname);
>
> return process_config(&s, get_next_char, "command line", NULL);
> }
>
> --- quote end ---
>
> Any suggestions how to deal with this? Does it work for other MacOS  
> X users?
>
> Regards,
> Markus
> _______________________________________________
> LCDproc mailing list
> LCDproc at lists.omnipotent.net
> http://lists.omnipotent.net/mailman/listinfo/lcdproc



More information about the LCDproc mailing list