diff -u -a -r vast-c++.orig/include/typedef.h vast-c++/include/typedef.h --- vast-c++.orig/include/typedef.h 2009-02-06 16:56:01.234737078 +0100 +++ vast-c++/include/typedef.h 2009-02-06 17:34:59.838488524 +0100 @@ -23,6 +23,7 @@ #define TYPEDEF_H #include // memcpy +#include #include #include "config.h" @@ -47,7 +48,7 @@ } vec3_t; // common message types -typedef enum VAST_Message +enum VAST_Message { DISCONNECT = 0, // disconnection without action: leaving overlay or no longer overlapped ID, // id for the host @@ -55,7 +56,7 @@ }; // bandwidth type define -typedef enum bandwidth_type_t +enum bandwidth_type_t { BW_UNKNOWN = 0, BW_UPLOAD, Only in vast-c++.orig/include: typedef.h.orig diff -u -a -r vast-c++.orig/include/vastutil.h vast-c++/include/vastutil.h --- vast-c++.orig/include/vastutil.h 2009-02-06 16:56:01.698761217 +0100 +++ vast-c++/include/vastutil.h 2009-02-06 16:12:25.397488763 +0100 @@ -30,7 +30,7 @@ #define _VAST_UTIL_H #include "config.h" - +#include //memcpy #include #include #include Only in vast-c++.orig/include: vastutil.h.orig diff -u -a -r vast-c++.orig/sim/VASTsim/statistics.h vast-c++/sim/VASTsim/statistics.h --- vast-c++.orig/sim/VASTsim/statistics.h 2007-12-25 01:26:42.000000000 +0100 +++ vast-c++/sim/VASTsim/statistics.h 2009-02-06 17:36:56.770737936 +0100 @@ -261,7 +261,7 @@ // fprintf (_fp, "Data Structure Sizes (in bytes)\n"); fprintf (_fp, "-------------------------------\n"); - fprintf (_fp, "id_t:%d aoi_t:%d msgtype_t:%d timestamp_t:%d Point:%d Node:%d Addr:%d\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr)); + fprintf (_fp, "id_t:%ld aoi_t:%ld msgtype_t:%ld timestamp_t:%ld Point:%ld Node:%ld Addr:%ld\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr)); fprintf (_fp, "Simulation Parameters\n"); fprintf (_fp, "---------------------\n"); @@ -391,22 +391,22 @@ fprintf (_fp, "%3.4f%%\t", (float)consistency * 100); // Send / Recv - fprintf (_fp, "%6d %-6d ", total_send/num_nodes, max_send_per_sec); - fprintf (_fp, "%6d %-6d ", total_recv/num_nodes, max_recv_per_sec); + fprintf (_fp, "%6d %-6ld ", total_send/num_nodes, max_send_per_sec); + fprintf (_fp, "%6d %-6ld ", total_recv/num_nodes, max_recv_per_sec); // added by yuli ==================================================== // Defalted Send / Recv if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) { - fprintf (_fp, "%8d %-8d ", total_def_send/num_nodes, max_def_send_per_sec); - fprintf (_fp, "%8d %-8d ", total_def_recv/num_nodes, max_def_recv_per_sec); + fprintf (_fp, "%8ld %-8ld ", total_def_send/num_nodes, max_def_send_per_sec); + fprintf (_fp, "%8ld %-8ld ", total_def_recv/num_nodes, max_def_recv_per_sec); } // ================================================================== // RS - fprintf (_fp, "%3.3f %-3d ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS); + fprintf (_fp, "%3.3f %-3ld ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS); // drift distance fprintf (_fp, "%3.3f %-3d ", (double)_total_drift / (double)_drift_nodes, (int)_max_drift); @@ -418,13 +418,13 @@ fprintf (_fp, "%3.3f %-3d ", (double)total_CN/(double)num_nodes, max_CN); // AN - fprintf (_fp, "%3.3f %-3d ", (double)_total_AN_visible/(double)num_samples, _max_AN); + fprintf (_fp, "%3.3f %-3ld ", (double)_total_AN_visible/(double)num_samples, _max_AN); // RC - fprintf (_fp, "%3d %3d %3.2f%% ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0)); + fprintf (_fp, "%3ld %3ld %3.2f%% ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0)); // TC actual data - fprintf (_fp, " %7d %7d\n", _total_AN_visible, _total_AN_actual); + fprintf (_fp, " %7ld %7ld\n", _total_AN_visible, _total_AN_actual); // store accumulated data _AN_visible_accumulated += _total_AN_visible; @@ -478,7 +478,7 @@ double consistency = (double)_AN_visible_accumulated / (double)_AN_actual_accumulated; fprintf (_fp, "\n\nSummary\n-------\n"); - fprintf (_fp, "Total elapsed time (seconds): %d stablized_steps: %d run_steps: %d\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps); + fprintf (_fp, "Total elapsed time (seconds): %d stablized_steps: %ld run_steps: %ld\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps); fprintf (_fp, "Topology Consistency (overall): %3.4f%%\n", consistency * 100); consistency = (double)(_AN_visible_accumulated-_AN_visible_first_interval) / (double)(_AN_actual_accumulated - _AN_actual_first_interval); fprintf (_fp, "Topology Consistency (after stablized): %3.4f%%\n\n", consistency * 100); @@ -490,7 +490,7 @@ // transmission size stat // - fprintf (_fp, "\ntransmission size (total # of bytes over %d steps)\n\n", _steps); + fprintf (_fp, "\ntransmission size (total # of bytes over %ld steps)\n\n", _steps); if (_para.VAST_MODEL == VAST_MODEL_DIRECT) fprintf (_fp, " send recv DISCONNCT ID QUERY HELLO EN MOVE MOVE_B NODE OVERCAP PAYLOAD\n"); else if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) @@ -499,7 +499,7 @@ for (i=0; i<(int)_simnodes.size (); i++) { SimNode *node = _simnodes[i]; - fprintf (_fp, "[%4d] %10d %10d\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ()); + fprintf (_fp, "[%4d] %10ld %10ld\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ()); } // diff -u -a -r vast-c++.orig/sim/VASTsim_console/Makefile vast-c++/sim/VASTsim_console/Makefile --- vast-c++.orig/sim/VASTsim_console/Makefile 2009-02-06 16:56:01.852760193 +0100 +++ vast-c++/sim/VASTsim_console/Makefile 2009-02-06 16:15:07.448510117 +0100 @@ -3,7 +3,7 @@ .PHONY: all noace -LIBS_COMMON = -lvastsim -lvast -lvastutil -lz +LIBS_COMMON = -lvastsim -lvast -lvastutil -lz -lpthread LIBS_ACE = -lACE ifeq ($(TARGET),noace) LIBS = $(LIBS_COMMON) Only in vast-c++.orig/sim/VASTsim_console: Makefile.orig diff -u -a -r vast-c++.orig/VAST/net_ace_acceptor.h vast-c++/VAST/net_ace_acceptor.h --- vast-c++.orig/VAST/net_ace_acceptor.h 2007-06-30 01:08:30.000000000 +0200 +++ vast-c++/VAST/net_ace_acceptor.h 2009-02-06 17:39:29.993738750 +0100 @@ -69,7 +69,7 @@ // handle can be used to differentiate if the same handler // is used for handling multiple connections, not used here - ACE_UNUSED_ARG (handle); + //ACE_UNUSED_ARG (handle); // create new handler net_ace_handler *handler; diff -u -a -r vast-c++.orig/VAST/vast_dc.h vast-c++/VAST/vast_dc.h --- vast-c++.orig/VAST/vast_dc.h 2007-06-30 01:08:30.000000000 +0200 +++ vast-c++/VAST/vast_dc.h 2009-02-06 17:37:51.834487651 +0100 @@ -53,7 +53,7 @@ #define STATE_OVERLAPPED (0x01) #define STATE_ENCLOSED (0x02) - typedef enum VAST_DC_Message + enum VAST_DC_Message { DC_QUERY = 10, // find out host to contact for initial neighbor list DC_HELLO, // initial connection request diff -u -a -r vast-c++.orig/VAST/vast_mc.h vast-c++/VAST/vast_mc.h --- vast-c++.orig/VAST/vast_mc.h 2007-06-30 01:08:30.000000000 +0200 +++ vast-c++/VAST/vast_mc.h 2009-02-06 17:38:01.000737905 +0100 @@ -16,7 +16,7 @@ #define MAX_DROP_COUNT 4 // # of time-steps to disconnect a non-overlapped neighbor #define MAX_HOP_COUNT_BUF 2 - typedef enum VAST_MC_Message + enum VAST_MC_Message { MC_QUERY = 30, // find out host to contact for initial neighbor list MC_INITLIST, // get initial neighbor list