[Asterisk-cvs] asterisk Makefile,1.192,1.193 astmm.c,1.18,1.19

kpfleming kpfleming
Tue Aug 23 11:06:55 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv15786

Modified Files:
	Makefile astmm.c 
Log Message:
make MALLOC_DEBUG build work properly (issue #4970 with additional changes)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -d -r1.192 -r1.193
--- Makefile	23 Aug 2005 02:30:30 -0000	1.192
+++ Makefile	23 Aug 2005 15:08:55 -0000	1.193
@@ -204,6 +204,11 @@
 M4=/usr/local/bin/m4
 endif
 
+# if doing a recursive make, don't double-up CFLAGS
+ifeq ($(MAKECMDGOALS),ast_expr.a)
+CFLAGS=
+endif
+
 INCLUDE=-Iinclude -I../include
 CFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
 CFLAGS+=$(OPTIMIZE)

Index: astmm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/astmm.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- astmm.c	3 Aug 2005 04:50:09 -0000	1.18
+++ astmm.c	23 Aug 2005 15:08:55 -0000	1.19
@@ -26,6 +26,7 @@
 #include "asterisk/logger.h"
 #include "asterisk/options.h"
 #include "asterisk/lock.h"
+#include "asterisk/strings.h"
 
 #define SOME_PRIME 563
 
@@ -253,7 +254,7 @@
 		reg = regions[x];
 		while (reg) {
 			if (!fn || !strcasecmp(fn, reg->file)) {
-				ast_cli(fd, "%10d bytes allocated in %20s at line %5d of %s\n", reg->len, reg->func, reg->lineno, reg->file);
+				ast_cli(fd, "%10d bytes allocated in %20s at line %5d of %s\n", (int) reg->len, reg->func, reg->lineno, reg->file);
 				len += reg->len;
 				count++;
 			}
@@ -357,7 +358,7 @@
 	ast_cli_register(&show_memory_allocations_cli);
 	ast_cli_register(&show_memory_summary_cli);
 	
-	snprintf(filename, sizeof(filename), "%s/mmlog", (char *)ast_config_AST_LOG_DIR)
+	snprintf(filename, sizeof(filename), "%s/mmlog", (char *)ast_config_AST_LOG_DIR);
 	mmlog = fopen(filename, "a+");
 	if (option_verbose)
 		ast_verbose("Asterisk Malloc Debugger Started (see %s))\n", filename);




More information about the svn-commits mailing list