Merged revisions 49237 via svnmerge from
[asterisk/asterisk.git] / main / ast_expr2.fl
index df9668f..8f156e8 100644 (file)
@@ -35,7 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include <locale.h>
 #include <ctype.h>
 #if !defined(SOLARIS) && !defined(__CYGWIN__)
-#include <err.h>
+/* #include <err.h> */
 #else
 #define quad_t int64_t
 #endif
@@ -241,11 +241,11 @@ 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 {
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
                        strncpy(buf, io.val->u.s, length - 1);
-#else /* !STANDALONE */
+#else /* !STANDALONE && !LOW_MEMORY */
                        ast_copy_string(buf, io.val->u.s, length);
-#endif /* STANDALONE */
+#endif /* STANDALONE || LOW_MEMORY */
                        return_value = strlen(buf);
                        free(io.val->u.s);
                }