diff -urN ns-2.27.orig/diffusion/diff_rate.cc ns-2.27/diffusion/diff_rate.cc --- ns-2.27.orig/diffusion/diff_rate.cc 2004-01-12 19:57:58.000000000 -0500 +++ ns-2.27/diffusion/diff_rate.cc 2005-01-22 21:41:36.578976416 -0500 @@ -370,7 +370,7 @@ INTF_INSERT(routing_table[dtype].active, OutPtr); routing_table[dtype].num_active ++; } else { - GRAD_TMOUT(RetVal.cur) = max(GRAD_TMOUT(RetVal.cur), + GRAD_TMOUT(RetVal.cur) = MAX(GRAD_TMOUT(RetVal.cur), dfh->ts_ + INTEREST_TIMEOUT); } @@ -789,7 +789,7 @@ if (RetVal.cur != NULL) { cur_out = (Out_List *)(RetVal.cur); GRADIENT(cur_out) = ORIGINAL; - GRAD_TMOUT(RetVal.cur) = max(GRAD_TMOUT(RetVal.cur), + GRAD_TMOUT(RetVal.cur) = MAX(GRAD_TMOUT(RetVal.cur), dfh->ts_ + INTEREST_TIMEOUT); NUM_POS_RECV(cur_out)++; } else { diff -urN ns-2.27.orig/diffusion/diffusion.h ns-2.27/diffusion/diffusion.h --- ns-2.27.orig/diffusion/diffusion.h 2004-01-12 19:57:58.000000000 -0500 +++ ns-2.27/diffusion/diffusion.h 2005-01-22 21:41:36.578976416 -0500 @@ -75,7 +75,7 @@ #define SEND_MESSAGE(x,y,z) send_to_dmux(prepare_message(x,y,z), 0) -#define max(a,b) (((a)<(b))?(b):(a)) +#define MAX(a,b) (((a)<(b))?(b):(a)) class DiffusionAgent; diff -urN ns-2.27.orig/diffusion/routing_table.cc ns-2.27/diffusion/routing_table.cc --- ns-2.27.orig/diffusion/routing_table.cc 2004-01-12 19:57:59.000000000 -0500 +++ ns-2.27/diffusion/routing_table.cc 2005-01-22 21:41:36.579976264 -0500 @@ -129,7 +129,7 @@ int most = 0; for (cur=iif; cur!=NULL; cur = IN_NEXT(cur)) { - most = max(most,NEW_ORG_RECV(cur)); + most = MAX(most,NEW_ORG_RECV(cur)); } return most; } diff -urN ns-2.27.orig/diffusion3/lib/nr/nr.hh ns-2.27/diffusion3/lib/nr/nr.hh --- ns-2.27.orig/diffusion3/lib/nr/nr.hh 2004-01-12 19:58:05.000000000 -0500 +++ ns-2.27/diffusion3/lib/nr/nr.hh 2005-01-22 21:41:36.579976264 -0500 @@ -43,7 +43,8 @@ typedef signed int int32_t; #endif typedef signed short int16_t; -#if defined (sparc) +// #if defined (sparc) +#if defined (__SVR4) && defined (__sun) typedef char int8_t; #else // Conflicts with system declaration of int8_t in Solaris