[asterisk-commits] kpfleming: branch 1.6.1 r144993 - in /branches/1.6.1: ./ agi/ include/ includ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 27 11:49:28 CDT 2008


Author: kpfleming
Date: Sat Sep 27 11:49:27 2008
New Revision: 144993

URL: http://svn.digium.com/view/asterisk?view=rev&rev=144993
Log:
Merged revisions 144949-144951 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r144949 | kpfleming | 2008-09-27 10:52:56 -0500 (Sat, 27 Sep 2008) | 17 lines
  
  Merged revisions 144924-144925 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines
    
    improve header inclusion process in a few small ways:
    
      - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
      - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
      - simplify the usage of some of these headers in the AEL-related stuff in the utils directory
  ........
    r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines
    
    fix some minor issues with rev 144924
  ........
................
  r144950 | kpfleming | 2008-09-27 11:10:33 -0500 (Sat, 27 Sep 2008) | 2 lines
  
  fix bugs caused by r144949 when MALLOC_DEBUG is defined
................
  r144951 | kpfleming | 2008-09-27 11:17:43 -0500 (Sat, 27 Sep 2008) | 1 line
  
  remove incorrect comment
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/Makefile
    branches/1.6.1/Makefile.moddir_rules
    branches/1.6.1/agi/Makefile
    branches/1.6.1/include/asterisk.h
    branches/1.6.1/include/asterisk/astmm.h
    branches/1.6.1/main/Makefile
    branches/1.6.1/main/ast_expr2.c
    branches/1.6.1/main/ast_expr2.fl
    branches/1.6.1/main/ast_expr2.y
    branches/1.6.1/main/ast_expr2f.c
    branches/1.6.1/main/astmm.c
    branches/1.6.1/main/stdtime/localtime.c
    branches/1.6.1/pbx/pbx_ael.c
    branches/1.6.1/utils/Makefile
    branches/1.6.1/utils/ael_main.c
    branches/1.6.1/utils/astman.c
    branches/1.6.1/utils/extconf.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/Makefile?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/Makefile (original)
+++ branches/1.6.1/Makefile Sat Sep 27 11:49:27 2008
@@ -231,8 +231,6 @@
 endif
 
 ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
-
-ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
   ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2

Modified: branches/1.6.1/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/Makefile.moddir_rules?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/Makefile.moddir_rules (original)
+++ branches/1.6.1/Makefile.moddir_rules Sat Sep 27 11:49:27 2008
@@ -17,12 +17,6 @@
 # (remember that they apply recursively to prerequisites).
 # Also note that we can only set one variable per rule, so we have to
 # repeat the left hand side to set multiple variables.
-
-ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
- ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
-  ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
- endif
-endif
 
 ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
   ASTCFLAGS+=${GC_CFLAGS}

Modified: branches/1.6.1/agi/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/agi/Makefile?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/agi/Makefile (original)
+++ branches/1.6.1/agi/Makefile Sat Sep 27 11:49:27 2008
@@ -29,8 +29,13 @@
 
 strcompat.c: ../main/strcompat.c
 	@cp $< $@
+strcompat.o: ASTCFLAGS+=-DSTANDALONE
+
+eagi-test.o: ASTCFLAGS+=-DSTANDALONE
 
 eagi-test: eagi-test.o strcompat.o
+
+eagi-sphinx-test.o: ASTCFLAGS+=-DSTANDALONE
 
 eagi-sphinx-test: eagi-sphinx-test.o
 

Modified: branches/1.6.1/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/include/asterisk.h?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/include/asterisk.h (original)
+++ branches/1.6.1/include/asterisk.h Sat Sep 27 11:49:27 2008
@@ -18,14 +18,11 @@
 #ifndef _ASTERISK_H
 #define _ASTERISK_H
 
-/* The include of 'autoconfig.h' is not necessary for any modules that
-   are part of the Asterisk source tree, because the top-level Makefile
-   will forcibly include that header in all compilations before all
-   other headers (even system headers). However, leaving this here will
-   help out-of-tree module builders, and doesn't cause any harm for the
-   in-tree modules.
-*/
 #include "asterisk/autoconfig.h"
+
+#if !defined(NO_MALLOC_DEBUG) && !defined(STANDALONE) && defined(MALLOC_DEBUG)
+#include "asterisk/astmm.h"
+#endif
 
 #include "asterisk/compat.h"
 

Modified: branches/1.6.1/include/asterisk/astmm.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/include/asterisk/astmm.h?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/include/asterisk/astmm.h (original)
+++ branches/1.6.1/include/asterisk/astmm.h Sat Sep 27 11:49:27 2008
@@ -26,6 +26,13 @@
 #define __AST_DEBUG_MALLOC
 
 #include "asterisk.h"
+
+/* Include these now to prevent them from being needed later */
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
 
 /* Undefine any macros */
 #undef malloc

Modified: branches/1.6.1/main/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/Makefile?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/Makefile (original)
+++ branches/1.6.1/main/Makefile Sat Sep 27 11:49:27 2008
@@ -123,9 +123,12 @@
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
 
 ast_expr2f.c:
-	flex -o $@ --full ast_expr2.fl # moved the correction of yyfree into the flex input file itself.
-	sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ast_expr2f.c > zz
-	mv zz ast_expr2f.c
+	flex -o $@ --full ast_expr2.fl
+	sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
+	echo "#include \"asterisk.h\"" > $@
+	echo >> $@
+	cat $@.fix >> $@
+	rm $@.fix
 
 ast_expr2f.o: ASTCFLAGS+=-Wno-unused
 

Modified: branches/1.6.1/main/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/ast_expr2.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/ast_expr2.c (original)
+++ branches/1.6.1/main/ast_expr2.c Sat Sep 27 11:49:27 2008
@@ -143,11 +143,14 @@
  * $FreeBSD: src/bin/expr/expr.y,v 1.16 2000/07/22 10:59:36 se Exp $
  */
 
+#include "asterisk.h"
+
 #include <sys/types.h>
 #include <stdio.h>
-#include "asterisk.h"
+
+#if !defined(STANDALONE)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-#ifdef STANDALONE
+#else
 #ifndef __USE_ISOC99
 #define __USE_ISOC99 1
 #endif
@@ -436,7 +439,6 @@
 static void		to_string __P((struct val *));
 static struct expr_node *alloc_expr_node(enum node_type);
 static void destroy_arglist(struct expr_node *arglist);
-static int is_really_num(char *str);
 
 /* uh, if I want to predeclare yylex with a YYLTYPE, I have to predeclare the yyltype... sigh */
 typedef struct yyltype
@@ -2502,61 +2504,6 @@
 	/* NOTREACHED */
 }
 
-#ifdef STANDALONE
-
-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
-{
-	va_list vars;
-	va_start(vars,fmt);
-	
-        printf("LOG: lev:%d file:%s  line:%d func: %s  ",
-                   level, file, line, function);
-	vprintf(fmt, vars);
-	fflush(stdout);
-	va_end(vars);
-}
-
-
-int main(int argc,char **argv) {
-	char s[4096];
-	char out[4096];
-	FILE *infile;
-	
-	if( !argv[1] )
-		exit(20);
-	
-	if( access(argv[1],F_OK)== 0 )
-	{
-		int ret;
-		
-		infile = fopen(argv[1],"r");
-		if( !infile )
-		{
-			printf("Sorry, couldn't open %s for reading!\n", argv[1]);
-			exit(10);
-		}
-		while( fgets(s,sizeof(s),infile) )
-		{
-			if( s[strlen(s)-1] == '\n' )
-				s[strlen(s)-1] = 0;
-			
-			ret = ast_expr(s, out, sizeof(out),NULL);
-			printf("Expression: %s    Result: [%d] '%s'\n",
-				   s, ret, out);
-		}
-		fclose(infile);
-	}
-	else
-	{
-		if (ast_expr(argv[1], s, sizeof(s), NULL))
-			printf("=====%s======\n",s);
-		else
-			printf("No result\n");
-	}
-}
-
-#endif
-
 #undef ast_yyerror
 #define ast_yyerror(x) ast_yyerror(x, YYLTYPE *yylloc, struct parse_io *parseio)
 
@@ -2581,6 +2528,7 @@
 	}
 }
 
+#if !defined(STANDALONE)
 static char *compose_func_args(struct expr_node *arglist)
 {
 	struct expr_node *t = arglist;
@@ -2630,7 +2578,7 @@
 	else
 		return 0;
 }
-
+#endif
 
 static struct val *op_func(struct val *funcname, struct expr_node *arglist, struct ast_channel *chan)
 {

Modified: branches/1.6.1/main/ast_expr2.fl
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/ast_expr2.fl?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/ast_expr2.fl (original)
+++ branches/1.6.1/main/ast_expr2.fl Sat Sep 27 11:49:27 2008
@@ -22,12 +22,10 @@
  * \brief Dialplan Expression Lexical Scanner
  */
 
-#include "asterisk.h"
-
 #include <sys/types.h>
 #include <stdio.h>
 
-#ifndef STANDALONE
+#if !defined(STANDALONE)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #else
 #ifndef __USE_ISOC99
@@ -276,7 +274,7 @@
 			return_value = (res_length <= length) ? res_length : length;
 		} else {
 			if (io.val->u.s)
-#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE)
 				strncpy(buf, io.val->u.s, length - 1);
 #else /* !STANDALONE && !LOW_MEMORY */
 				ast_copy_string(buf, io.val->u.s, length);

Modified: branches/1.6.1/main/ast_expr2.y
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/ast_expr2.y?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/ast_expr2.y (original)
+++ branches/1.6.1/main/ast_expr2.y Sat Sep 27 11:49:27 2008
@@ -12,11 +12,14 @@
  * $FreeBSD: src/bin/expr/expr.y,v 1.16 2000/07/22 10:59:36 se Exp $
  */
 
+#include "asterisk.h"
+
 #include <sys/types.h>
 #include <stdio.h>
-#include "asterisk.h"
+
+#if !defined(STANDALONE)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-#ifdef STANDALONE
+#else
 #ifndef __USE_ISOC99
 #define __USE_ISOC99 1
 #endif
@@ -305,7 +308,6 @@
 static void		to_string __P((struct val *));
 static struct expr_node *alloc_expr_node(enum node_type);
 static void destroy_arglist(struct expr_node *arglist);
-static int is_really_num(char *str);
 
 /* uh, if I want to predeclare yylex with a YYLTYPE, I have to predeclare the yyltype... sigh */
 typedef struct yyltype
@@ -648,61 +650,6 @@
 	/* NOTREACHED */
 }
 
-#ifdef STANDALONE
-
-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
-{
-	va_list vars;
-	va_start(vars,fmt);
-	
-        printf("LOG: lev:%d file:%s  line:%d func: %s  ",
-                   level, file, line, function);
-	vprintf(fmt, vars);
-	fflush(stdout);
-	va_end(vars);
-}
-
-
-int main(int argc,char **argv) {
-	char s[4096];
-	char out[4096];
-	FILE *infile;
-	
-	if( !argv[1] )
-		exit(20);
-	
-	if( access(argv[1],F_OK)== 0 )
-	{
-		int ret;
-		
-		infile = fopen(argv[1],"r");
-		if( !infile )
-		{
-			printf("Sorry, couldn't open %s for reading!\n", argv[1]);
-			exit(10);
-		}
-		while( fgets(s,sizeof(s),infile) )
-		{
-			if( s[strlen(s)-1] == '\n' )
-				s[strlen(s)-1] = 0;
-			
-			ret = ast_expr(s, out, sizeof(out),NULL);
-			printf("Expression: %s    Result: [%d] '%s'\n",
-				   s, ret, out);
-		}
-		fclose(infile);
-	}
-	else
-	{
-		if (ast_expr(argv[1], s, sizeof(s), NULL))
-			printf("=====%s======\n",s);
-		else
-			printf("No result\n");
-	}
-}
-
-#endif
-
 #undef ast_yyerror
 #define ast_yyerror(x) ast_yyerror(x, YYLTYPE *yylloc, struct parse_io *parseio)
 
@@ -727,6 +674,7 @@
 	}
 }
 
+#if !defined(STANDALONE)
 static char *compose_func_args(struct expr_node *arglist)
 {
 	struct expr_node *t = arglist;
@@ -776,7 +724,7 @@
 	else
 		return 0;
 }
-
+#endif
 
 static struct val *op_func(struct val *funcname, struct expr_node *arglist, struct ast_channel *chan)
 {

Modified: branches/1.6.1/main/ast_expr2f.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/ast_expr2f.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/ast_expr2f.c (original)
+++ branches/1.6.1/main/ast_expr2f.c Sat Sep 27 11:49:27 2008
@@ -1,3 +1,5 @@
+#include "asterisk.h"
+
 #line 2 "ast_expr2f.c"
 
 #line 4 "ast_expr2f.c"
@@ -2316,12 +2318,10 @@
  * \brief Dialplan Expression Lexical Scanner
  */
 
-#include "asterisk.h"
-
 #include <sys/types.h>
 #include <stdio.h>
 
-#ifndef STANDALONE
+#if !defined(STANDALONE)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #else
 #ifndef __USE_ISOC99
@@ -4133,7 +4133,7 @@
 			return_value = (res_length <= length) ? res_length : length;
 		} else {
 			if (io.val->u.s)
-#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
+#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE)
 				strncpy(buf, io.val->u.s, length - 1);
 #else /* !STANDALONE && !LOW_MEMORY */
 				ast_copy_string(buf, io.val->u.s, length);

Modified: branches/1.6.1/main/astmm.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/astmm.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/astmm.c (original)
+++ branches/1.6.1/main/astmm.c Sat Sep 27 11:49:27 2008
@@ -23,9 +23,9 @@
  * \author Mark Spencer <markster at digium.com>
  */
 
+#include "asterisk.h"
+
 #ifdef __AST_DEBUG_MALLOC
-
-#include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 

Modified: branches/1.6.1/main/stdtime/localtime.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/stdtime/localtime.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/main/stdtime/localtime.c (original)
+++ branches/1.6.1/main/stdtime/localtime.c Sat Sep 27 11:49:27 2008
@@ -43,7 +43,6 @@
 /* #define DEBUG */
 
 /*LINTLIBRARY*/
-
 
 #include "asterisk.h"
 

Modified: branches/1.6.1/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/pbx/pbx_ael.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/pbx/pbx_ael.c (original)
+++ branches/1.6.1/pbx/pbx_ael.c Sat Sep 27 11:49:27 2008
@@ -28,7 +28,9 @@
 
 #include "asterisk.h"
 
+#if !defined(STANDALONE)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <ctype.h>
 #include <regex.h>
@@ -262,7 +264,7 @@
 	return pbx_load_module();
 }
 
-#ifdef STANDALONE_AEL
+#ifdef STANDALONE
 #define AST_MODULE "ael"
 int ael_external_load_module(void);
 int ael_external_load_module(void)

Modified: branches/1.6.1/utils/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/utils/Makefile?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/utils/Makefile (original)
+++ branches/1.6.1/utils/Makefile Sat Sep 27 11:49:27 2008
@@ -16,8 +16,9 @@
 
 .PHONY: clean all uninstall
 
-# to get check_expr, add it to the ALL_UTILS list
-ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted check_expr conf2ael hashtest2 hashtest astcanary refcounter
+ALL_UTILS:=astman smsq stereorize streamplayer muted check_expr hashtest2 hashtest astcanary refcounter
+# aelparse and conf2ael currently not being built because they rely on extconf, which is horribly broken
+# ALL_UTILS:=aelparse conf2ael
 UTILS:=$(ALL_UTILS)
 
 LIBS += $(BKTR_LIB)	# astobj2 with devmode uses backtrace
@@ -80,89 +81,86 @@
 
 md5.c: $(ASTTOPDIR)/main/md5.c
 	@cp $< $@
+md5.o: ASTCFLAGS+=-DSTANDALONE
+
 astman: astman.o md5.o
 astman: LIBS+=$(NEWT_LIB)
+astman.o: ASTCFLAGS+=-DSTANDALONE
 
 stereorize: stereorize.o frame.o
 stereorize: LIBS+=-lm
 
 hashtab.c: $(ASTTOPDIR)/main/hashtab.c
 	@cp $< $@
+hashtab.o: ASTCFLAGS+=-DSTANDALONE
 
 strcompat.c: $(ASTTOPDIR)/main/strcompat.c
 	@cp $< $@
-
-$(ASTTOPDIR)/main/ast_expr2.c:
-	@echo "   [BISON] $(ASTTOPDIR)/main/ast_expr2.y -> $@"
-	@bison -o $@ -d --name-prefix=ast_yy $(ASTTOPDIR)/main/ast_expr2.y
-
-$(ASTTOPDIR)/main/ast_expr2f.c:
-	@echo "   [FLEX] $(ASTTOPDIR)/main/ast_expr2.fl -> $@"
-	@flex -o $@ --full $(ASTTOPDIR)/main/ast_expr2.fl
+strcompat.o: ASTCFLAGS+=-DSTANDALONE
 
 pval.c: $(ASTTOPDIR)/res/ael/pval.c
 	@cp $< $@
+pval.o : ASTCFLAGS+=-DSTANDALONE
 
 ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
 	@cp $< $@
+ast_expr2.o: ASTCFLAGS+=-DSTANDALONE
 
 ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
 	@cp $< $@
-
-ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I$(ASTTOPDIR)/main -Wno-unused
-
-pval.o : ASTCFLAGS+=-DSTANDALONE
+ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE -I$(ASTTOPDIR)/main -Wno-unused
 
 check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
+check_expr.o: ASTCFLAGS+=-DSTANDALONE
 
 aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
 	@cp $< $@
-
-aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael  -DYYENABLE_NLS=0
+aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael  -DYYENABLE_NLS=0 -DSTANDALONE
 
 pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
 	@cp $< $@
-
-pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
+pbx_ael.o: ASTCFLAGS+=-DSTANDALONE
 
 aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
 	@cp $< $@
 
-aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE_AEL -Wno-unused
+ael_main.o: ASTCFLAGS+=-DSTANDALONE
 
+aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE -Wno-unused
 aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
 
 astobj2.c: $(ASTTOPDIR)/main/astobj2.c
 	@cp $< $@
+astobj2.o: ASTCFLAGS+=-DSTANDALONE
 
 utils.c: $(ASTTOPDIR)/main/utils.c
 	@cp $< $@
+utils.o: ASTCFLAGS+=-DSTANDALONE
 
 sha1.c: $(ASTTOPDIR)/main/sha1.c
 	@cp $< $@
+sha1.o: ASTCFLAGS+=-DSTANDALONE
 
 threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
 	@cp $< $@
+threadstorage.o: ASTCFLAGS+=-DSTANDALONE
 
-hashtest2.o: ASTCFLAGS+=-O0
-
+hashtest2.o: ASTCFLAGS+=-O0 -DSTANDALONE
 hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
 
 hashtest: hashtest.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
-
-hashtest.o: ASTCFLAGS+=-O0
+hashtest.o: ASTCFLAGS+=-O0 -DSTANDALONE
 
 refcounter: refcounter.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
-
-refcounter.o: ASTCFLAGS+=-O0
+refcounter.o: ASTCFLAGS+=-O0 -DSTANDALONE
 
 extconf.o: extconf.c
 
 conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
 
 testexpr2s: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h
-	$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE_AEL $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2f.o
-	$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE_AEL $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2.o
+	$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2f.o
+	$(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2.o
 	$(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
 	rm ast_expr2.o ast_expr2f.o 
 	./testexpr2s expr2.testinput

Modified: branches/1.6.1/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/utils/ael_main.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/utils/ael_main.c (original)
+++ branches/1.6.1/utils/ael_main.c Sat Sep 27 11:49:27 2008
@@ -169,16 +169,6 @@
 	return 0; /* in "standalone" mode, functions are just not avail */
 }
 
-void ast_register_file_version(const char *file, const char *version);
-void ast_register_file_version(const char *file, const char *version)
-{
-}
-
-void ast_unregister_file_version(const char *file);
-void ast_unregister_file_version(const char *file)
-{
-}
-
 #if !defined(LOW_MEMORY)
 int ast_add_profile(const char *x, uint64_t scale)
 {

Modified: branches/1.6.1/utils/astman.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/utils/astman.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/utils/astman.c (original)
+++ branches/1.6.1/utils/astman.c Sat Sep 27 11:49:27 2008
@@ -24,6 +24,8 @@
 
 #include "asterisk.h"
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk.h"
+
 #include <newt.h>
 #include <stdio.h>
 #include <sys/time.h>

Modified: branches/1.6.1/utils/extconf.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/utils/extconf.c?view=diff&rev=144993&r1=144992&r2=144993
==============================================================================
--- branches/1.6.1/utils/extconf.c (original)
+++ branches/1.6.1/utils/extconf.c Sat Sep 27 11:49:27 2008
@@ -23,6 +23,8 @@
  * for operations outside of asterisk. A huge, awful hack.
  *
  */
+#include "asterisk.h"
+
 #undef DEBUG_THREADS
 
 #include "asterisk/compat.h"
@@ -81,12 +83,6 @@
 #define VERBOSE_PREFIX_3 "    -- "
 #define VERBOSE_PREFIX_4 "       > "
 
-/* IN CONFLICT: void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
-   __attribute__ ((format (printf, 5, 6))); */
-
-static void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) __attribute__ ((format (printf,5,6)));
-
-
 void ast_backtrace(void);
 
 void ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt, ...)
@@ -99,9 +95,6 @@
 int ast_unregister_verbose(void (*verboser)(const char *string));
 
 void ast_console_puts(const char *string);
-
-void ast_console_puts_mutable(const char *string);
-void ast_console_toggle_mute(int fd);
 
 #define _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__
 
@@ -1767,56 +1760,6 @@
 #define AST_CACHE_DIR_LEN 	512
 #define AST_FILENAME_MAX	80
 
-/*! \ingroup main_options */
-enum ast_option_flags {
-	/*! Allow \#exec in config files */
-	AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0),
-	/*! Do not fork() */
-	AST_OPT_FLAG_NO_FORK = (1 << 1),
-	/*! Keep quiet */
-	AST_OPT_FLAG_QUIET = (1 << 2),
-	/*! Console mode */
-	AST_OPT_FLAG_CONSOLE = (1 << 3),
-	/*! Run in realtime Linux priority */
-	AST_OPT_FLAG_HIGH_PRIORITY = (1 << 4),
-	/*! Initialize keys for RSA authentication */
-	AST_OPT_FLAG_INIT_KEYS = (1 << 5),
-	/*! Remote console */
-	AST_OPT_FLAG_REMOTE = (1 << 6),
-	/*! Execute an asterisk CLI command upon startup */
-	AST_OPT_FLAG_EXEC = (1 << 7),
-	/*! Don't use termcap colors */
-	AST_OPT_FLAG_NO_COLOR = (1 << 8),
-	/*! Are we fully started yet? */
-	AST_OPT_FLAG_FULLY_BOOTED = (1 << 9),
-	/*! Trascode via signed linear */
-	AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10),
-	/*! Enable priority jumping in applications */
-	AST_OPT_FLAG_PRIORITY_JUMPING = (1 << 11),
-	/*! Dump core on a seg fault */
-	AST_OPT_FLAG_DUMP_CORE = (1 << 12),
-	/*! Cache sound files */
-	AST_OPT_FLAG_CACHE_RECORD_FILES = (1 << 13),
-	/*! Display timestamp in CLI verbose output */
-	AST_OPT_FLAG_TIMESTAMP = (1 << 14),
-	/*! Override config */
-	AST_OPT_FLAG_OVERRIDE_CONFIG = (1 << 15),
-	/*! Reconnect */
-	AST_OPT_FLAG_RECONNECT = (1 << 16),
-	/*! Transmit Silence during Record() */
-	AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17),
-	/*! Suppress some warnings */
-	AST_OPT_FLAG_DONT_WARN = (1 << 18),
-	/*! End CDRs before the 'h' extension */
-	AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN = (1 << 19),
-	/*! Use DAHDI Timing for generators if available */
-	AST_OPT_FLAG_INTERNAL_TIMING = (1 << 20),
-	/*! Always fork, even if verbose or debug settings are non-zero */
-	AST_OPT_FLAG_ALWAYS_FORK = (1 << 21),
-	/*! Disable log/verbose output to remote consoles */
-	AST_OPT_FLAG_MUTE = (1 << 22)
-};
-
 /*! These are the options that set by default when Asterisk starts */
 #define AST_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN
 
@@ -1850,8 +1793,6 @@
 extern double option_maxload;
 extern char defaultlanguage[];
 
-extern time_t ast_startuptime;
-extern time_t ast_lastreloadtime;
 extern pid_t ast_mainpid;
 
 extern char record_cache_dir[AST_CACHE_DIR_LEN];
@@ -2706,14 +2647,6 @@
 	return name;
 }
 
-
-/* stolen from asterisk.c */
-
-static struct ast_flags ast_options = { AST_DEFAULT_OPTIONS };
-static int option_verbose = 0;                         /*!< Verbosity level */
-static int option_debug = 0;                           /*!< Debug level */
-
-
 /* experiment 1: see if it's easier just to use existing config code
  *               to read in the extensions.conf file. In this scenario, 
                  I have to rip/copy code from other modules, because they
@@ -2735,7 +2668,7 @@
 	va_end(vars);
 }
 
-static void __attribute__((format (printf, 1, 2))) ast_verbose(const char *fmt, ...)
+void __attribute__((format (printf, 1, 2))) ast_verbose(const char *fmt, ...)
 {
 	va_list vars;
 	va_start(vars,fmt);




More information about the asterisk-commits mailing list