mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
Makefile
2
Makefile
@@ -203,8 +203,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)
|
||||
endif
|
||||
|
@@ -11,12 +11,6 @@
|
||||
# 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}
|
||||
endif
|
||||
|
@@ -18,15 +18,12 @@
|
||||
#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"
|
||||
|
||||
#include "asterisk/paths.h"
|
||||
|
@@ -131,7 +131,7 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#ifndef STANDALONE
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#ifndef STANDALONE
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#ifndef STANDALONE
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
|
@@ -504,7 +504,7 @@ static yyconst flex_int16_t yy_chk[127] =
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#ifndef STANDALONE
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
|
@@ -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$")
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -179,7 +179,9 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -24,7 +24,9 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -817,7 +817,9 @@ static yyconst flex_int16_t yy_chk[1073] =
|
||||
* 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>
|
||||
|
@@ -24,7 +24,9 @@
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#if !defined(STANDALONE_AEL)
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -83,6 +83,8 @@ strcompat.c: ../main/strcompat.c
|
||||
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 @@ check_expr: check_expr.o ast_expr2.o ast_expr2f.o
|
||||
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 $< $@
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#include "asterisk.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -78,10 +80,7 @@ char last_exten[18000];
|
||||
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 @@ struct ast_app *pbx_findapp(const char *app)
|
||||
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 @@ void ast_cli_register_multiple(void)
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user