[svn-commits] trunk r33423 - in /trunk: pbx/ael/ael.flex
pbx/ael/ael_lex.c utils/Makefile
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Jun 9 21:41:35 MST 2006
Author: russell
Date: Fri Jun 9 23:41:34 2006
New Revision: 33423
URL: http://svn.digium.com/view/asterisk?rev=33423&view=rev
Log:
don't use ast_copy_string when building for an external tool
Modified:
trunk/pbx/ael/ael.flex
trunk/pbx/ael/ael_lex.c
trunk/utils/Makefile
Modified: trunk/pbx/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.flex?rev=33423&r1=33422&r2=33423&view=diff
==============================================================================
--- trunk/pbx/ael/ael.flex (original)
+++ trunk/pbx/ael/ael.flex Fri Jun 9 23:41:34 2006
@@ -404,7 +404,11 @@
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);
Modified: trunk/pbx/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael_lex.c?rev=33423&r1=33422&r2=33423&view=diff
==============================================================================
--- trunk/pbx/ael/ael_lex.c (original)
+++ trunk/pbx/ael/ael_lex.c Fri Jun 9 23:41:34 2006
@@ -1553,7 +1553,11 @@
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(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 @@
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 @@
/* 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 @@
#define YYTABLES_NAME "yytables"
-#line 449 "ael.flex"
+#line 453 "ael.flex"
Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?rev=33423&r1=33422&r2=33423&view=diff
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Fri Jun 9 23:41:34 2006
@@ -74,7 +74,7 @@
$(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 $@ $<
More information about the svn-commits
mailing list