fix build for 64

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8866 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-06-30 21:55:38 +00:00
parent ebe53e826c
commit 4b369c4f93
2 changed files with 21 additions and 15 deletions

View File

@ -10,7 +10,7 @@ include $(BASE)/build/modmake.rules
local_depend: $(LIBYAML_A)
$(LIBYAML_A):
cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared
cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared --with-pic
cd $(YAMLLIB) && $(MAKE)
yamlclean:

View File

@ -46,11 +46,11 @@ static void print_error(yaml_parser_t *parser)
case YAML_READER_ERROR:
if (parser->problem_value != -1) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Reader error: %s: #%X at %d\n", parser->problem,
parser->problem_value, parser->problem_offset);
parser->problem_value, (int) parser->problem_offset);
}
else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Reader error: %s at %d\n", parser->problem,
parser->problem_offset);
(int) parser->problem_offset);
}
break;
@ -58,14 +58,14 @@ static void print_error(yaml_parser_t *parser)
if (parser->context) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Scanner error: %s at line %d, column %d\n"
"%s at line %d, column %d\n", parser->context,
parser->context_mark.line+1, parser->context_mark.column+1,
parser->problem, parser->problem_mark.line+1,
parser->problem_mark.column+1);
(int)parser->context_mark.line+1, (int)parser->context_mark.column+1,
parser->problem, (int)parser->problem_mark.line+1,
(int)parser->problem_mark.column+1);
}
else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Scanner error: %s at line %d, column %d\n",
parser->problem, parser->problem_mark.line+1,
parser->problem_mark.column+1);
parser->problem, (int)parser->problem_mark.line+1,
(int)parser->problem_mark.column+1);
}
break;
@ -73,14 +73,14 @@ static void print_error(yaml_parser_t *parser)
if (parser->context) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parser error: %s at line %d, column %d\n"
"%s at line %d, column %d\n", parser->context,
parser->context_mark.line+1, parser->context_mark.column+1,
parser->problem, parser->problem_mark.line+1,
parser->problem_mark.column+1);
(int)parser->context_mark.line+1, (int)parser->context_mark.column+1,
parser->problem, (int)parser->problem_mark.line+1,
(int)parser->problem_mark.column+1);
}
else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parser error: %s at line %d, column %d\n",
parser->problem, parser->problem_mark.line+1,
parser->problem_mark.column+1);
parser->problem, (int)parser->problem_mark.line+1,
(int)parser->problem_mark.column+1);
}
break;
@ -339,6 +339,11 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
uint32_t len = 0;
char *substituted = NULL;
char *app_data;
if (!strcasecmp(name, "exit")) {
yaml_event_delete(&event);
goto end;
}
if (!extension) {
extension = switch_caller_extension_new(session, "YAML", caller_profile->destination_number);
@ -353,9 +358,8 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
} else {
app_data = value;
}
switch_caller_extension_add_application(session, extension, name, app_data);
printf("TEST [%s][%s][%s]\n", category, name, app_data);
switch_safe_free(substituted);
}
}
@ -371,6 +375,8 @@ static switch_caller_extension_t *parse_dp(FILE *input, switch_core_session_t *s
yaml_event_delete(&event);
}
end:
switch_safe_free(last_field);
switch_regex_safe_free(re);
yaml_parser_delete(&parser);