[Asterisk-cvs] zaptel Makefile, 1.72, 1.73 fxsdump.c, 1.1,
1.2 patgen.c, 1.3, 1.4 patlooptest.c, 1.3, 1.4 pattest.c, 1.3,
1.4 timertest.c, 1.1, 1.2 ztdiag.c, 1.1, 1.2
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Wed Apr 20 11:26:34 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv3090
Modified Files:
Makefile fxsdump.c patgen.c patlooptest.c pattest.c
timertest.c ztdiag.c
Log Message:
build fixes for minor zaptel tools (bug #4039)
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/zaptel/Makefile,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- Makefile 20 Apr 2005 14:23:07 -0000 1.72
+++ Makefile 20 Apr 2005 16:17:17 -0000 1.73
@@ -236,7 +236,7 @@
$(CC) -o usbfxstest usbfxstest.o -lzap
fxstest: fxstest.o
- $(CC) -o fxstest fxstest.o -ltonezone
+ $(CC) -o fxstest fxstest.o -L. -ltonezone -lm
fxotune: fxotune.o
$(CC) -o fxotune fxotune.o -lm
@@ -247,6 +247,9 @@
stackcheck: checkstack $(BUILDVER)
./checkstack *.o
+ztdiag: ztdiag.o
+ $(CC) -o ztdiag ztdiag.o
+
devices:
ifeq ($(DYNFS),)
mkdir -p $(INSTALL_PREFIX)/dev/zap
Index: fxsdump.c
===================================================================
RCS file: /usr/cvsroot/zaptel/fxsdump.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fxsdump.c 24 Oct 2003 13:36:13 -0000 1.1
+++ fxsdump.c 20 Apr 2005 16:17:17 -0000 1.2
@@ -5,8 +5,14 @@
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
-#include <linux/zaptel.h>
#include <math.h>
+#include <netinet/in.h>
+
+#ifdef STANDALONE_ZAPATA
+#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
#include "coeffs.h"
Index: patgen.c
===================================================================
RCS file: /usr/cvsroot/zaptel/patgen.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- patgen.c 23 Apr 2004 02:10:18 -0000 1.3
+++ patgen.c 20 Apr 2005 16:17:17 -0000 1.4
@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <linux/zaptel.h>
#include <stdio.h>
#include <linux/types.h>
#include <linux/ppp_defs.h>
@@ -11,6 +10,12 @@
#include <stdlib.h>
#include "bittest.h"
+#ifdef STANDALONE_ZAPATA
+#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
+
/* #define BLOCK_SIZE 2048 */
#define BLOCK_SIZE 2041
Index: patlooptest.c
===================================================================
RCS file: /usr/cvsroot/zaptel/patlooptest.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- patlooptest.c 30 Oct 2003 23:17:02 -0000 1.3
+++ patlooptest.c 20 Apr 2005 16:17:17 -0000 1.4
@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <linux/zaptel.h>
#include <stdio.h>
#include <linux/types.h>
#include <linux/ppp_defs.h>
@@ -11,6 +10,12 @@
#include <stdlib.h>
#include <time.h>
+#ifdef STANDALONE_ZAPATA
+#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
+
#define BLOCK_SIZE 2039
void print_packet(unsigned char *buf, int len)
@@ -25,8 +30,7 @@
int main(int argc, char *argv[])
{
int fd;
- int fd2;
- int ires, res, x;
+ int res, x;
int i;
ZT_PARAMS tp;
int bs = BLOCK_SIZE;
@@ -34,8 +38,6 @@
unsigned char c=0,c1=0;
unsigned char inbuf[BLOCK_SIZE];
unsigned char outbuf[BLOCK_SIZE];
- unsigned int fcs;
- static int packets=0;
int setup=0;
int errors=0;
int bytes=0;
Index: pattest.c
===================================================================
RCS file: /usr/cvsroot/zaptel/pattest.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pattest.c 23 Apr 2004 02:10:18 -0000 1.3
+++ pattest.c 20 Apr 2005 16:17:17 -0000 1.4
@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <linux/zaptel.h>
#include <stdio.h>
#include <linux/types.h>
#include <linux/ppp_defs.h>
@@ -11,6 +10,12 @@
#include <stdlib.h>
#include "bittest.h"
+#ifdef STANDALONE_ZAPATA
+#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
+
#define BLOCK_SIZE 2039
void print_packet(unsigned char *buf, int len)
Index: timertest.c
===================================================================
RCS file: /usr/cvsroot/zaptel/timertest.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- timertest.c 20 Mar 2003 07:00:04 -0000 1.1
+++ timertest.c 20 Apr 2005 16:17:17 -0000 1.2
@@ -7,7 +7,12 @@
#include <sys/select.h>
#include <sys/time.h>
#include <errno.h>
+
+#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
int main(int argc, char *argv[])
{
@@ -43,7 +48,7 @@
exit(1);
}
gettimeofday(&now, NULL);
- printf("Timer Expired (%d ms)!\n", (now.tv_sec - orig.tv_sec) * 1000 + (now.tv_usec - orig.tv_usec) / 1000);
+ printf("Timer Expired (%ld ms)!\n", (now.tv_sec - orig.tv_sec) * 1000 + (now.tv_usec - orig.tv_usec) / 1000);
}
exit(0);
}
Index: ztdiag.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdiag.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ztdiag.c 22 Oct 2002 22:59:02 -0000 1.1
+++ ztdiag.c 20 Apr 2005 16:17:17 -0000 1.2
@@ -1,9 +1,14 @@
#include <sys/ioctl.h>
-#include <linux/zaptel.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#ifdef STANDALONE_ZAPATA
+#include "zaptel.h"
+#else
+#include <linux/zaptel.h>
+#endif
+
int main(int argc, char *argv[])
{
int fd;
More information about the svn-commits
mailing list