--- trunk/darkstattype.c 2014/04/09 09:20:17 19 +++ trunk/darkstattype.c 2014/04/09 10:26:49 20 @@ -3,7 +3,9 @@ $Ximalas$ - Tested on FreeBSD/amd64 stable/9 r263290 with clang 3.3. + Tested on FreeBSD/i386 stable/8 r255624 with gcc 4.2.1. + Tested on FreeBSD/amd64 stable/9 r263963 with clang 3.3. + Tested on FreeBSD/amd64 stable/9 r263963 with clang 3.3 using -m32. Copyright © 2014, Trond Endrestøl All rights reserved. @@ -341,14 +343,14 @@ void decode_host_header_v1(void) bytesin = read64u(); print_indentation(); - printf("Bytes in %lu\n", - bytesin); + printf("Bytes in %llu\n", + (unsigned long long)bytesin); bytesout = read64u(); print_indentation(); - printf("Bytes out %lu\n", - bytesout); + printf("Bytes out %llu\n", + (unsigned long long)bytesout); if ( (protosdata = read8u()) != 'P') { // missing protos data fprintf(stderr, @@ -422,8 +424,8 @@ void decode_host_header_v2(void) lastseen = read64s(); print_indentation(); - printf("Last seen 0x%lx = %ld = ", - lastseen, lastseen); + printf("Last seen 0x%llx = %lld = ", + (unsigned long long)lastseen, (long long)lastseen); print_time_t(lastseen); puts(""); } // if @@ -431,8 +433,8 @@ void decode_host_header_v2(void) lastseen = read64s(); print_indentation(); - printf("Last seen 0x%lx = %ld = ", - lastseen, lastseen); + printf("Last seen 0x%llx = %lld = ", + (unsigned long long)lastseen, (long long)lastseen); print_time_t(lastseen); puts(""); @@ -467,14 +469,14 @@ void decode_host_header_v2(void) bytesin = read64u(); print_indentation(); - printf("Bytes in %lu\n", - bytesin); + printf("Bytes in %llu\n", + (unsigned long long)bytesin); bytesout = read64u(); print_indentation(); - printf("Bytes out %lu\n", - bytesout); + printf("Bytes out %llu\n", + (unsigned long long)bytesout); if ( (protosdata = read8u()) != 'P') { // missing protos data fprintf(stderr, @@ -584,8 +586,8 @@ void decode_host_header_v3(void) lastseen = read64s(); print_indentation(); - printf("Last seen 0x%lx = %ld = ", - lastseen, lastseen); + printf("Last seen 0x%llx = %lld = ", + (unsigned long long)lastseen, (long long)lastseen); print_time_t(lastseen); puts(""); } // if @@ -593,8 +595,8 @@ void decode_host_header_v3(void) lastseen = read64s(); print_indentation(); - printf("Last seen 0x%lx = %ld = ", - lastseen, lastseen); + printf("Last seen 0x%llx = %lld = ", + (unsigned long long)lastseen, (long long)lastseen); print_time_t(lastseen); puts(""); @@ -629,14 +631,14 @@ void decode_host_header_v3(void) bytesin = read64u(); print_indentation(); - printf("Bytes in %lu\n", - bytesin); + printf("Bytes in %llu\n", + (unsigned long long)bytesin); bytesout = read64u(); print_indentation(); - printf("Bytes out %lu\n", - bytesout); + printf("Bytes out %llu\n", + (unsigned long long)bytesout); if ( (protosdata = read8u()) != 'P') { // missing protos data fprintf(stderr, @@ -701,14 +703,14 @@ void decode_protos_data(void) in = read64u(); print_indentation(); - printf("In %lu\n", - in); + printf("In %llu\n", + (unsigned long long)in); out = read64u(); print_indentation(); - printf("Out %lu\n", - out); + printf("Out %llu\n", + (unsigned long long)out); exdent(); } // for @@ -746,20 +748,20 @@ void decode_tcp_data(void) indent(); print_indentation(); - printf("SYN %lu\n", - syn); + printf("SYN %llu\n", + (unsigned long long)syn); in = read64u(); print_indentation(); - printf("In %lu\n", - in); + printf("In %llu\n", + (unsigned long long)in); out = read64u(); print_indentation(); - printf("Out %lu\n", - out); + printf("Out %llu\n", + (unsigned long long)out); exdent(); } // for @@ -796,14 +798,14 @@ void decode_udp_data(void) indent(); print_indentation(); - printf("In %lu\n", - in); + printf("In %llu\n", + (unsigned long long)in); out = read64u(); print_indentation(); - printf("Out %lu\n", - out); + printf("Out %llu\n", + (unsigned long long)out); exdent(); } // for @@ -821,8 +823,8 @@ void decode_graph_db_v1(void) indent(); print_indentation(); - printf("Last time 0x%lx = %ld = ", - lasttime, lasttime); + printf("Last time 0x%llx = %lld = ", + (unsigned long long)lasttime, (long long)lasttime); print_time_t(lasttime); puts(""); @@ -862,14 +864,14 @@ void decode_graph_db_v1(void) indent(); print_indentation(); - printf("In %lu\n", - in); + printf("In %llu\n", + (unsigned long long)in); out = read64u(); print_indentation(); - printf("Out %lu\n", - out); + printf("Out %llu\n", + (unsigned long long)out); exdent(); } // for