[libss7-commits] mattf: trunk r110 - in /trunk: Makefile parser_debug.c

SVN commits to the libss7 project libss7-commits at lists.digium.com
Thu Oct 4 21:35:50 CDT 2007


Author: mattf
Date: Thu Oct  4 21:35:50 2007
New Revision: 110

URL: http://svn.digium.com/view/libss7?view=rev&rev=110
Log:
Do some compiler trickery for big endian machines

Modified:
    trunk/Makefile
    trunk/parser_debug.c

Modified: trunk/Makefile
URL: http://svn.digium.com/view/libss7/trunk/Makefile?view=diff&rev=110&r1=109&r2=110
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Oct  4 21:35:50 2007
@@ -52,7 +52,7 @@
 	gcc -g -o ss7linktest ss7linktest.c libss7.a -lpthread
 
 parser_debug: parser_debug.c $(STATIC_LIBRARY)
-	gcc -g -o parser_debug parser_debug.c libss7.a
+	gcc -g -Wall -o parser_debug parser_debug.c libss7.a
 
 libss7: ss7_mtp.o mtp.o ss7.o ss7_sched.o
 

Modified: trunk/parser_debug.c
URL: http://svn.digium.com/view/libss7/trunk/parser_debug.c?view=diff&rev=110&r1=109&r2=110
==============================================================================
--- trunk/parser_debug.c (original)
+++ trunk/parser_debug.c Thu Oct  4 21:35:50 2007
@@ -10,6 +10,7 @@
 	FILE *fp;
 	struct ss7 *ss7 = ss7_new(SS7_ANSI);
 	unsigned char mybuf[512];
+	unsigned int tmp;
 	int res = 0, i = 0, size;
 	ss7_event *e;
 
@@ -19,7 +20,8 @@
 	fp = fopen(argv[1], "r");
 
 	while (res != EOF) {
-		res = fscanf(fp, "%x ", &mybuf[i++]);
+		res = fscanf(fp, "%x ", &tmp);
+		mybuf[i++] = (unsigned char) tmp;
 	}
 
 	size = i + 1;




More information about the libss7-commits mailing list