#34 configfile.c breaks on Mac OS X due to nested function

server (16)
Erik Hansen

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);


  • Markus Dolze

    Markus Dolze - 2009-02-23

    Please update the email address your Sourceforge address refers to.

  • Markus Dolze

    Markus Dolze - 2009-02-24

    What version of LCDproc are you using? This code has been disabled since 0.5.2.

  • Markus Dolze

    Markus Dolze - 2009-03-24

    Bug closed, no feedback within 4 weeks.

  • Markus Dolze

    Markus Dolze - 2009-03-24
    • status: open --> closed-invalid

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks