diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-10 04:41:34 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-10 04:41:34 +0000 |
commit | f352569f79781341732d31fbc8977d327ea09614 (patch) | |
tree | 609b300e334134497bbad46b61babdf30ef121da | |
parent | c299dc314b006fa94bab6e1d2c45dbc805ec8e34 (diff) |
don't use ast_copy_string when building for an external tool
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33423 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | pbx/ael/ael.flex | 4 | ||||
-rw-r--r-- | pbx/ael/ael_lex.c | 14 | ||||
-rw-r--r-- | utils/Makefile | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex index 4bac6f0a8..e66ce1287 100644 --- a/pbx/ael/ael.flex +++ b/pbx/ael/ael.flex @@ -404,7 +404,11 @@ includes { STORE_POS; return KW_INCLUDES;} if (*(p1+1) != '/') snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1); else +#ifdef STANDALONE + strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1); +#else ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf)); +#endif in1 = fopen( fnamebuf, "r" ); if ( ! in1 ) { ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf); diff --git a/pbx/ael/ael_lex.c b/pbx/ael/ael_lex.c index 616b675d5..95635b932 100644 --- a/pbx/ael/ael_lex.c +++ b/pbx/ael/ael_lex.c @@ -1553,7 +1553,11 @@ YY_RULE_SETUP if (*(p1+1) != '/') snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1); else +#ifdef STANDALONE + strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1); +#else ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf)); +#endif in1 = fopen( fnamebuf, "r" ); if ( ! in1 ) { ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf); @@ -1586,7 +1590,7 @@ case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(paren): case YY_STATE_EOF(semic): case YY_STATE_EOF(argg): -#line 436 "ael.flex" +#line 440 "ael.flex" { if ( --include_stack_index < 0 ) { yyterminate(); @@ -1602,10 +1606,10 @@ case YY_STATE_EOF(argg): YY_BREAK case 55: YY_RULE_SETUP -#line 449 "ael.flex" +#line 453 "ael.flex" ECHO; YY_BREAK -#line 1608 "ael_lex.c" +#line 1612 "ael_lex.c" case YY_END_OF_BUFFER: { @@ -1836,7 +1840,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -2735,7 +2739,7 @@ void ael_yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 449 "ael.flex" +#line 453 "ael.flex" diff --git a/utils/Makefile b/utils/Makefile index dc31d2708..49e466caa 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -74,7 +74,7 @@ check_expr: check_expr.c ast_expr2.o ast_expr2f.o $(CC) $(CFLAGS) -o $@ $^ aelflex.o: ../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h - $(CC) $(CFLAGS) -I../pbx/ -c -o $@ $< + $(CC) $(CFLAGS) -I../pbx/ -DSTANDALONE -c -o $@ $< aelbison.o: ../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h $(CC) $(CFLAGS) -I../pbx/ -c -o $@ $< |