[Asterisk-cvs] asterisk Makefile,1.94,1.95 asterisk.c,1.90,1.91 pbx.c,1.125,1.126

markster at lists.digium.com markster at lists.digium.com
Sun Jun 13 16:20:48 CDT 2004


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

Modified Files:
	Makefile asterisk.c pbx.c 
Log Message:
x86-64 compile fixes and cleanups


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- Makefile	12 Jun 2004 14:34:15 -0000	1.94
+++ Makefile	13 Jun 2004 21:25:09 -0000	1.95
@@ -20,6 +20,12 @@
 
 ifeq (${OSARCH},Linux)
 PROC=$(shell uname -m)
+ifeq ($(PROC),x86_64)
+# You must have GCC 3.4 to use k8, otherwise use athlon
+PROC=k8
+#PROC=athlon
+OPTIONS+=-m64
+endif
 else
 ifeq (${OSARCH},FreeBSD)
 PROC=$(shell uname -m)

Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- asterisk.c	11 Jun 2004 00:12:34 -0000	1.90
+++ asterisk.c	13 Jun 2004 21:25:09 -0000	1.91
@@ -1216,7 +1216,7 @@
 	free(matches);
 	}
 
-	return (char *)retval;
+	return (char *)(long)retval;
 }
 
 static int ast_el_initialize(void)
@@ -1459,7 +1459,7 @@
 
 	/* Remember original args for restart */
 	if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) {
-		fprintf(stderr, "Truncating argument size to %d\n", sizeof(_argv) / sizeof(_argv[0]) - 1);
+		fprintf(stderr, "Truncating argument size to %d\n", (int)(sizeof(_argv) / sizeof(_argv[0])) - 1);
 		argc = sizeof(_argv) / sizeof(_argv[0]) - 1;
 	}
 	for (x=0;x<argc;x++)

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- pbx.c	12 Jun 2004 14:34:15 -0000	1.125
+++ pbx.c	13 Jun 2004 21:25:09 -0000	1.126
@@ -794,7 +794,7 @@
 			char cp3[80];
 			strncpy(cp3, var, sizeof(cp3) - 1);
 			cp3[len-len_len-1]='\0';
-			sprintf(workspace,"%d",strlen(cp3));
+			sprintf(workspace,"%d",(int)strlen(cp3));
 			*ret = workspace;
 		} else {
 			/* length is zero */




More information about the svn-commits mailing list