[asterisk-commits] kpfleming: branch 1.4 r144924 - in /branches/1.4: ./ include/ main/ main/stdt...

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


Author: kpfleming
Date: Sat Sep 27 10:00:48 2008
New Revision: 144924

URL: http://svn.digium.com/view/asterisk?view=rev&rev=144924
Log:
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

Modified:
    branches/1.4/Makefile
    branches/1.4/Makefile.moddir_rules
    branches/1.4/include/asterisk.h
    branches/1.4/main/ast_expr2.c
    branches/1.4/main/ast_expr2.fl
    branches/1.4/main/ast_expr2.y
    branches/1.4/main/ast_expr2f.c
    branches/1.4/main/stdtime/localtime.c
    branches/1.4/pbx/ael/ael.flex
    branches/1.4/pbx/ael/ael.tab.c
    branches/1.4/pbx/ael/ael.y
    branches/1.4/pbx/ael/ael_lex.c
    branches/1.4/pbx/pbx_ael.c
    branches/1.4/utils/Makefile
    branches/1.4/utils/ael_main.c

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/Makefile?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Sat Sep 27 10:00:48 2008
@@ -202,8 +202,6 @@
 endif
 
 ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
-
-ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
   ASTCFLAGS+=-Werror  -Wunused $(AST_DECLARATION_AFTER_STATEMENT)

Modified: branches/1.4/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/branches/1.4/Makefile.moddir_rules?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/Makefile.moddir_rules (original)
+++ branches/1.4/Makefile.moddir_rules Sat Sep 27 10:00:48 2008
@@ -10,12 +10,6 @@
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
-
-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.4/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk.h?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/include/asterisk.h (original)
+++ branches/1.4/include/asterisk.h Sat Sep 27 10:00:48 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(STANDALONE_AEL) && defined(MALLOC_DEBUG)
+#include "asterisk/astmm.h"
+#endif
 
 #include "asterisk/compat.h"
 

Modified: branches/1.4/main/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/ast_expr2.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/main/ast_expr2.c (original)
+++ branches/1.4/main/ast_expr2.c Sat Sep 27 10:00:48 2008
@@ -131,7 +131,7 @@
 
 #include "asterisk.h"
 
-#ifndef STANDALONE
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #endif
 

Modified: branches/1.4/main/ast_expr2.fl
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/ast_expr2.fl?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/main/ast_expr2.fl (original)
+++ branches/1.4/main/ast_expr2.fl Sat Sep 27 10:00:48 2008
@@ -24,7 +24,7 @@
 
 #include "asterisk.h"
 
-#ifndef STANDALONE
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #endif
 

Modified: branches/1.4/main/ast_expr2.y
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/ast_expr2.y?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/main/ast_expr2.y (original)
+++ branches/1.4/main/ast_expr2.y Sat Sep 27 10:00:48 2008
@@ -14,7 +14,7 @@
 
 #include "asterisk.h"
 
-#ifndef STANDALONE
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #endif
 

Modified: branches/1.4/main/ast_expr2f.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/ast_expr2f.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/main/ast_expr2f.c (original)
+++ branches/1.4/main/ast_expr2f.c Sat Sep 27 10:00:48 2008
@@ -504,7 +504,7 @@
 
 #include "asterisk.h"
 
-#ifndef STANDALONE
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #endif
 

Modified: branches/1.4/main/stdtime/localtime.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/stdtime/localtime.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/main/stdtime/localtime.c (original)
+++ branches/1.4/main/stdtime/localtime.c Sat Sep 27 10:00:48 2008
@@ -44,6 +44,8 @@
 
 /*LINTLIBRARY*/
 
+#include "asterisk.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -55,7 +57,6 @@
 
 #include "private.h"
 #include "tzfile.h"
-#include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 

Modified: branches/1.4/pbx/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael.flex?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/pbx/ael/ael.flex (original)
+++ branches/1.4/pbx/ael/ael.flex Sat Sep 27 10:00:48 2008
@@ -60,7 +60,9 @@
 %option bison-locations
 
 %{
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>

Modified: branches/1.4/pbx/ael/ael.tab.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael.tab.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/pbx/ael/ael.tab.c (original)
+++ branches/1.4/pbx/ael/ael.tab.c Sat Sep 27 10:00:48 2008
@@ -179,7 +179,9 @@
 
 #include "asterisk.h"
 
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: branches/1.4/pbx/ael/ael.y
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael.y?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/pbx/ael/ael.y (original)
+++ branches/1.4/pbx/ael/ael.y Sat Sep 27 10:00:48 2008
@@ -24,7 +24,9 @@
 
 #include "asterisk.h"
 
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: branches/1.4/pbx/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael_lex.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/pbx/ael/ael_lex.c (original)
+++ branches/1.4/pbx/ael/ael_lex.c Sat Sep 27 10:00:48 2008
@@ -817,7 +817,9 @@
  * bison-locations is probably not needed.
  */
 #line 63 "ael.flex"
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>

Modified: branches/1.4/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_ael.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/pbx/pbx_ael.c (original)
+++ branches/1.4/pbx/pbx_ael.c Sat Sep 27 10:00:48 2008
@@ -24,7 +24,9 @@
 
 #include "asterisk.h"
 
+#if !defined(STANDALONE_AEL)
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#endif
 
 #include <sys/types.h>
 #include <stdlib.h>

Modified: branches/1.4/utils/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/utils/Makefile?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/utils/Makefile (original)
+++ branches/1.4/utils/Makefile Sat Sep 27 10:00:48 2008
@@ -83,6 +83,8 @@
 ast_expr2.c: ../main/ast_expr2.c
 	@cp $< $@
 
+ast_expr2.o: ASTCFLAGS+=-DSTANDALONE_AEL
+
 ast_expr2f.c: ../main/ast_expr2f.c
 	@cp $< $@
 
@@ -93,13 +95,14 @@
 aelbison.c: ../pbx/ael/ael.tab.c
 	@cp $< $@
 aelbison.o: aelbison.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h
-aelbison.o: ASTCFLAGS+=-I../pbx
+aelbison.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL
 
 pbx_ael.c: ../pbx/pbx_ael.c
 	@cp $< $@
 pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
 
 ael_main.o: ael_main.c ../include/asterisk/ael_structs.h
+ael_main.o: ASTCFLAGS+=-DSTANDALONE_AEL
 
 aelparse.c: ../pbx/ael/ael_lex.c
 	@cp $< $@

Modified: branches/1.4/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/utils/ael_main.c?view=diff&rev=144924&r1=144923&r2=144924
==============================================================================
--- branches/1.4/utils/ael_main.c (original)
+++ branches/1.4/utils/ael_main.c Sat Sep 27 10:00:48 2008
@@ -1,3 +1,5 @@
+#include "asterisk.h"
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -78,10 +80,7 @@
 char ast_config_AST_CONFIG_DIR[PATH_MAX];
 char ast_config_AST_VAR_DIR[PATH_MAX];
 
-void ast_add_profile(void);
 void ast_cli_register_multiple(void);
-void ast_register_file_version(void);
-void ast_unregister_file_version(void);
 int ast_add_extension2(struct ast_context *con,
 					   int replace, const char *extension, int priority, const char *label, const char *callerid,
 						const char *application, void *data, void (*datad)(void *),
@@ -115,12 +114,6 @@
 	return (struct ast_app*)1; /* so as not to trigger an error */
 }
 
-void ast_add_profile(void)
-{
-	if (!no_comp)
-		printf("Executed ast_add_profile();\n");
-}
-
 int ast_loader_register(int (*updater)(void))
 {
 	return 1;
@@ -145,20 +138,6 @@
         	printf("Executed ast_cli_register_multiple();\n");
 }
 
-void ast_register_file_version(void)
-{
-	/* if(!no_comp)
-		printf("Executed ast_register_file_version();\n"); */
-	/* I'm erasing this, because I don't think anyone really ever needs to see it anyway */
-}
-
-void ast_unregister_file_version(void)
-{
-	/* if(!no_comp)
-		printf("Executed ast_unregister_file_version();\n"); */
-	/* I'm erasing this, because I don't think anyone really ever needs to see it anyway */
-
-}
 void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count);
 void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count)
 {




More information about the asterisk-commits mailing list