make sure non-inlined versions of ast_copy_string and _ast_calloc are available
authorRussell Bryant <russell@russellbryant.com>
Mon, 1 May 2006 19:23:43 +0000 (19:23 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 1 May 2006 19:23:43 +0000 (19:23 +0000)
in the cases where they are needed (issue #7054)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23984 65c4cc65-6c06-0410-ace0-fbb531ad65f3

utils/ael_main.c

index 018077b..c495fd4 100644 (file)
 #include <errno.h>
 #include <regex.h>
 #include <limits.h>
+
+/* ast_copy_string */
+#define AST_API_MODULE
+#include "asterisk/strings.h"
+
+/* ensure that _ast_calloc works */
+#define AST_API_MODULE 
+#include "asterisk/utils.h"
+
 #include "asterisk/ast_expr.h"
 #include "asterisk/logger.h"
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/app.h"
 #include "asterisk/ael_structs.h"
+
 #define AST_CONFIG_MAX_PATH 255
 
 int conts=0, extens=0, priors=0;
@@ -53,18 +63,6 @@ struct ast_app *pbx_findapp(const char *app)
        return (struct ast_app*)1; /* so as not to trigger an error */
 }
 
-
-void ast_copy_string(char *dst, const char *src, size_t size)
-{
-        while (*src && size) {
-                *dst++ = *src++;
-                size--;
-        }
-        if (__builtin_expect(!size, 0))
-                dst--;
-        *dst = '\0';
-}
-
 void ast_cli_register_multiple(void)
 {
        if(!no_comp)