]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
A fix for the flex input files, DONT_COMPILE, and STANDALONE_AEL
authorSteve Murphy <murf@digium.com>
Mon, 26 Mar 2007 17:38:29 +0000 (17:38 +0000)
committerSteve Murphy <murf@digium.com>
Mon, 26 Mar 2007 17:38:29 +0000 (17:38 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59206 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/ast_expr2.fl
main/ast_expr2f.c
pbx/ael/ael.flex
pbx/ael/ael_lex.c

index 8f156e81fcd67c9e84d5934644b885aaefd0cac4..5990a66ed63debbcf2aaccf458fdc5ac87c83791 100644 (file)
@@ -241,7 +241,7 @@ int ast_expr(char *expr, char *buf, int length)
                        res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
                        return_value = (res_length <= length) ? res_length : length;
                } else {
-#if defined(STANDALONE) || defined(LOW_MEMORY)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
                        strncpy(buf, io.val->u.s, length - 1);
 #else /* !STANDALONE && !LOW_MEMORY */
                        ast_copy_string(buf, io.val->u.s, length);
index b0e69450f48404fa4a38c37fccbfb5cd549ec2f5..6ba3244dd19d822ffab1ee9434113daf5f92434e 100644 (file)
@@ -3122,7 +3122,7 @@ int ast_expr(char *expr, char *buf, int length)
                        res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
                        return_value = (res_length <= length) ? res_length : length;
                } else {
-#if defined(STANDALONE) || defined(LOW_MEMORY)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
                        strncpy(buf, io.val->u.s, length - 1);
 #else /* !STANDALONE && !LOW_MEMORY */
                        ast_copy_string(buf, io.val->u.s, length);
index 41f24601c16e603da5ddc5ee6170973382437935..cfdd5eb94845092f064bebd3cbe51e475fd284d9 100644 (file)
@@ -411,7 +411,7 @@ includes    { STORE_POS; return KW_INCLUDES;}
                        if (*(p1+1) != '/')
                                snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
                        else
-#if defined(STANDALONE) || defined(LOW_MEMORY)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
                                strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
 #else
                                ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
index 3a9ffc9601792ad8f45063b2cb8e8cc6939ce1f6..9a8747cab1b6bc6caebd22c6e231a8983d77f383 100644 (file)
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 #include "asterisk.h"
-#ifdef STANDALONE_AEL
-#define AST_API_MODULE
-#include "asterisk/strings.h"
-#endif
 /* begin standard C headers. */
 #include <stdio.h>
 #include <string.h>
@@ -1687,7 +1683,7 @@ YY_RULE_SETUP
                        if (*(p1+1) != '/')
                                snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
                        else
-#if defined(STANDALONE) || defined(LOW_MEMORY)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
                                strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
 #else
                                ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));