Debug builds add -std=c99 (or -xc99 for suncc) to CFLAGS
(AX_CFLAGS_WARN_ALL_ANSI configure macro).
Non-debug builds do not invoke AX_CFLAGS_WARN_ALL_ANSI checks and
therefore won't have C99 support enabled, which breaks the build of
mod_http_cache due to "for (int i... )"-style C99 loops.
NOTE: AC_PROG_CC_C99 would make a lot of sense here and MSVC (2005)
accepts "for (int ...)" constructs too.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Use switch_event_add_header_string() where needed and add a
dummy "%s" format string to switch_event_add_body() calls.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Use a chain of "else if" statements, drop known_opt completely.
Added bonus: We stop trying to parse option arguments as (possible) options.
Arguments of -u/-g and path options (-conf) now check whether their argument
starts with a dash ('-') and error out in case it does (= next option, not a valid argument).
Use PATH_MAX for everything that stores files / directories.
Use switch_bool_t and SWITCH_TRUE/_FALSE for boolean variables.
Use EXIT_SUCCESS/_FAILURE for exit() calls.
Get rid of excessive indenting (especially in the win32 parts of main()).
NOTE: Win32 parts untested.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Move empty cmdline option string check and "-help/-h/-?" handling to top of loop.
Emit a proper error message for unknown options. (Just displaying the
usage description, but not telling the user which option was wrong, is bad mojo).
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Errors fixed:
sofia.c: In function 'sofia_handle_sip_i_refer':
sofia.c:7323:5: error: format not a string literal and no format arguments
sofia.c:7324:5: error: format not a string literal and no format arguments
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>