diff options
author | Aaron Walker <ka0ttic@gentoo.org> | 2005-01-23 10:32:06 +0000 |
---|---|---|
committer | Aaron Walker <ka0ttic@gentoo.org> | 2005-01-23 10:32:06 +0000 |
commit | b5fddaa9b695cc9e37a86d32cad0ec73254700b8 (patch) | |
tree | 7f7569fb0003dd5769088b06eed4c4663ecb117c /net-analyzer/ns | |
parent | rev bump. fixes for amd64 (diff) | |
download | gentoo-2-b5fddaa9b695cc9e37a86d32cad0ec73254700b8.tar.gz gentoo-2-b5fddaa9b695cc9e37a86d32cad0ec73254700b8.tar.bz2 gentoo-2-b5fddaa9b695cc9e37a86d32cad0ec73254700b8.zip |
Fix compilation failure with gcc-3.4 for bug 70154.
(Portage version: 2.0.51-r14)
Diffstat (limited to 'net-analyzer/ns')
-rw-r--r-- | net-analyzer/ns/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/ns/Manifest | 5 | ||||
-rw-r--r-- | net-analyzer/ns/files/ns-2.27-gentoo.diff | 292 | ||||
-rw-r--r-- | net-analyzer/ns/ns-2.27-r1.ebuild | 12 |
4 files changed, 311 insertions, 6 deletions
diff --git a/net-analyzer/ns/ChangeLog b/net-analyzer/ns/ChangeLog index cda0bcd69bed..9b0a6c689abd 100644 --- a/net-analyzer/ns/ChangeLog +++ b/net-analyzer/ns/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/ns -# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ns/ChangeLog,v 1.11 2004/07/13 06:42:12 eldad Exp $ +# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ns/ChangeLog,v 1.12 2005/01/23 10:32:06 ka0ttic Exp $ + + 23 Jan 2005; Aaron Walker <ka0ttic@gentoo.org> +files/ns-2.27-gentoo.diff, + ns-2.27-r1.ebuild: + Fix compilation failure with gcc-3.4 for bug 70154. 13 Jul 2004; Eldad Zack <eldad@gentoo.org> +metadata.xml: Added metadata diff --git a/net-analyzer/ns/Manifest b/net-analyzer/ns/Manifest index d6d1a9007a70..f7b3d69b7294 100644 --- a/net-analyzer/ns/Manifest +++ b/net-analyzer/ns/Manifest @@ -1,4 +1,5 @@ -MD5 b8b933227b6196ca35b633ea588f45a0 ns-2.27-r1.ebuild 2432 -MD5 fcf013ebe055290c1a896619aaaf1869 ChangeLog 1470 +MD5 2e6f8985635d2be5e3b41f015b689f9a ns-2.27-r1.ebuild 2525 +MD5 56fbbd4adf4c8729cef6c8217b49f592 ChangeLog 1623 MD5 c132a750577527d57e9e3ce8747b212c metadata.xml 212 +MD5 f7b94c91182a6e9cf19719c8abd4dfda files/ns-2.27-gentoo.diff 11242 MD5 cbd46edc227114c8538b564b0bdf1ae6 files/digest-ns-2.27-r1 65 diff --git a/net-analyzer/ns/files/ns-2.27-gentoo.diff b/net-analyzer/ns/files/ns-2.27-gentoo.diff new file mode 100644 index 000000000000..5ccb6ac1f0d3 --- /dev/null +++ b/net-analyzer/ns/files/ns-2.27-gentoo.diff @@ -0,0 +1,292 @@ +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 +@@ -221,6 +222,7 @@ + }; + + // string specialization ++template <> + class NRSimpleAttribute<char *>: public NRAttribute { + public: + NRSimpleAttribute(int key, int type, int op, char *val, int size = 0); +@@ -236,6 +238,7 @@ + }; + + // blob specialization ++template <> + class NRSimpleAttribute<void *>: public NRAttribute { + public: + NRSimpleAttribute(int key, int type, int op, void *val, int size); +diff -urN ns-2.27.orig/indep-utils/cmu-scen-gen/setdest/Makefile.in ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile.in +--- ns-2.27.orig/indep-utils/cmu-scen-gen/setdest/Makefile.in 2004-01-12 19:58:39.000000000 -0500 ++++ ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile.in 2005-01-22 21:41:36.579976264 -0500 +@@ -37,7 +37,7 @@ + MKDEP = ../../../conf/mkdep + + # when including files from ns, we need to take care STL_NAMESPACE +-DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ ++DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@ + CFLAGS = @V_CCOPT@ + LDFLAGS = @V_STATIC@ + LIBS = @V_LIB@ -lm @LIBS@ +diff -urN ns-2.27.orig/indep-utils/cmu-scen-gen/setdest/setdest.cc ns-2.27/indep-utils/cmu-scen-gen/setdest/setdest.cc +--- ns-2.27.orig/indep-utils/cmu-scen-gen/setdest/setdest.cc 2004-01-12 19:58:39.000000000 -0500 ++++ ns-2.27/indep-utils/cmu-scen-gen/setdest/setdest.cc 2005-01-22 21:43:02.378932840 -0500 +@@ -68,7 +68,10 @@ + #define NODE_FORMAT2 "$node_(%d) setdest %.12f %.12f %.12f\n" + #define NODE_FORMAT3 "$node_(%d) set %c_ %.12f\n" + +-#define INFINITY 0x00ffffff ++#ifdef INFINITY ++# undef INFINITY ++# define INFINITY 0x00ffffff ++#endif + #define min(x,y) ((x) < (y) ? (x) : (y)) + #define max(x,y) ((x) > (y) ? (x) : (y)) + #define ROUND_ERROR 1e-9 +diff -urN ns-2.27.orig/indep-utils/webtrace-conv/dec/Makefile.in ns-2.27/indep-utils/webtrace-conv/dec/Makefile.in +--- ns-2.27.orig/indep-utils/webtrace-conv/dec/Makefile.in 2004-01-12 19:58:44.000000000 -0500 ++++ ns-2.27/indep-utils/webtrace-conv/dec/Makefile.in 2005-01-22 21:41:36.580976112 -0500 +@@ -38,7 +38,7 @@ + # when including files from ns, we need to take care STL_NAMESPACE + CC = @CXX@ + INCLUDE = -I. @V_INCLUDES@ +-CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ ++CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@ + LDFLAGS = @V_STATIC@ + LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@ + INSTALL = @INSTALL@ +diff -urN ns-2.27.orig/indep-utils/webtrace-conv/nlanr/Makefile.in ns-2.27/indep-utils/webtrace-conv/nlanr/Makefile.in +--- ns-2.27.orig/indep-utils/webtrace-conv/nlanr/Makefile.in 2004-01-12 19:58:48.000000000 -0500 ++++ ns-2.27/indep-utils/webtrace-conv/nlanr/Makefile.in 2005-01-22 21:41:36.580976112 -0500 +@@ -35,7 +35,7 @@ + # when including files from ns, we need to take care STL_NAMESPACE + CC = @CXX@ + INCLUDE = -I. -I../../.. @V_INCLUDES@ +-CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ ++CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@ + LDFLAGS = @V_STATIC@ + LIBS = @V_LIB_TCL@ @V_LIB@ @LIBS@ + INSTALL = @INSTALL@ +diff -urN ns-2.27.orig/linkstate/ls.h ns-2.27/linkstate/ls.h +--- ns-2.27.orig/linkstate/ls.h 2004-01-12 19:59:00.000000000 -0500 ++++ ns-2.27/linkstate/ls.h 2005-01-22 21:41:36.581975960 -0500 +@@ -86,7 +86,7 @@ + LsList() : baseList() {} + LsList(const _Tp& x) : baseList(1, x) {} + void eraseAll() { +- baseList::erase(begin(), end()); ++ baseList::erase(baseList::begin(), baseList::end()); + } + LsList<_Tp>& operator= (const LsList<_Tp> & x) { + return (LsList<_Tp> &)baseList::operator= (x); +@@ -109,7 +109,7 @@ + return ib.second ? ib.first : baseMap::end(); + } + +- void eraseAll() { erase(begin(), end()); } ++ void eraseAll() { erase(baseMap::begin(), baseMap::end()); } + T* findPtr(Key key) { + iterator it = baseMap::find(key); + return (it == baseMap::end()) ? (T *)NULL : &((*it).second); +diff -urN ns-2.27.orig/mac/wireless-phy.cc ns-2.27/mac/wireless-phy.cc +--- ns-2.27.orig/mac/wireless-phy.cc 2004-01-12 19:59:15.000000000 -0500 ++++ ns-2.27/mac/wireless-phy.cc 2005-01-22 21:41:36.582975808 -0500 +@@ -55,7 +55,7 @@ + + #include "diffusion/diff_header.h" + +-#define max(a,b) (((a)<(b))?(b):(a)) ++#define MAX(a,b) (((a)<(b))?(b):(a)) + + void Idle_Timer::expire(Event *) { + a_->UpdateIdleEnergy(); +@@ -200,8 +200,8 @@ + if (em()->energy() > 0) { + //double txtime = (8.*hdr_cmn::access(p)->size())/bandwidth_; + double txtime = hdr_cmn::access(p)->txtime(); +- double start_time = max(channel_idle_time_, NOW); +- double end_time = max(channel_idle_time_, NOW+txtime); ++ double start_time = MAX(channel_idle_time_, NOW); ++ double end_time = MAX(channel_idle_time_, NOW+txtime); + double actual_txtime = end_time-start_time; + + if (start_time > update_energy_time_) { +@@ -220,7 +220,7 @@ + */ + + // Sanity check +- double temp = max(NOW,last_send_time_); ++ double temp = MAX(NOW,last_send_time_); + + /* + if (NOW < last_send_time_) { +@@ -228,8 +228,8 @@ + } + */ + +- double begin_adjust_time = min(channel_idle_time_, temp); +- double finish_adjust_time = min(channel_idle_time_, NOW+txtime); ++ double begin_adjust_time = MIN(channel_idle_time_, temp); ++ double finish_adjust_time = MIN(channel_idle_time_, NOW+txtime); + double gap_adjust_time = finish_adjust_time - begin_adjust_time; + if (gap_adjust_time < 0.0) { + fprintf(stderr,"What the heck ! negative gap time.\n"); +@@ -354,8 +354,8 @@ + em()->DecrRcvEnergy(rcvtime,Pr_consume_); + */ + +- double start_time = max(channel_idle_time_, NOW); +- double end_time = max(channel_idle_time_, NOW+rcvtime); ++ double start_time = MAX(channel_idle_time_, NOW); ++ double end_time = MAX(channel_idle_time_, NOW+rcvtime); + double actual_rcvtime = end_time-start_time; + + if (start_time > update_energy_time_) { +diff -urN ns-2.27.orig/mobile/god.cc ns-2.27/mobile/god.cc +--- ns-2.27.orig/mobile/god.cc 2004-01-12 19:59:06.000000000 -0500 ++++ ns-2.27/mobile/god.cc 2005-01-22 21:41:36.583975656 -0500 +@@ -645,7 +645,7 @@ + for(i = 0; i < num_nodes; i++) { + for(j = 0; j < num_nodes; j++) { + for(k = 0; k < num_nodes; k++) { +- MIN_HOPS(j,k) = min(MIN_HOPS(j,k), MIN_HOPS(j,i) + MIN_HOPS(i,k)); ++ MIN_HOPS(j,k) = MIN(MIN_HOPS(j,k), MIN_HOPS(j,i) + MIN_HOPS(i,k)); + } + } + } +diff -urN ns-2.27.orig/mobile/gridkeeper.cc ns-2.27/mobile/gridkeeper.cc +--- ns-2.27.orig/mobile/gridkeeper.cc 2004-01-12 19:59:06.000000000 -0500 ++++ ns-2.27/mobile/gridkeeper.cc 2005-01-22 21:41:36.583975656 -0500 +@@ -133,7 +133,7 @@ + endy = mn->destY(); + + if (vx > 0) { +- endi = min(dim_x_-1, (int)endx); ++ endi = MIN(dim_x_-1, (int)endx); + for (i = (int)x+1; i <= endi; i++) { + tm = (i-x)/vx; + pother = vy*tm + y; +@@ -182,7 +182,7 @@ + } + } + if (vy > 0) { +- endi = min(dim_y_-1, (int)endy); ++ endi = MIN(dim_y_-1, (int)endy); + for (j = (int)y+1; j <= endi; j++) { + tm = (j-y)/vy; + pother = vx*tm + x; +@@ -237,11 +237,11 @@ + + adj = (int)ceil(mnr); + +- ulx = min(dim_x_-1, grid_x + adj); +- uly = min(dim_y_-1, grid_y + adj); +- lly = max(0, grid_y - adj); ++ ulx = MIN(dim_x_-1, grid_x + adj); ++ uly = MIN(dim_y_-1, grid_y + adj); ++ lly = MAX(0, grid_y - adj); + +- for (i = max(0, grid_x - adj); i <= ulx; i++) { ++ for (i = MAX(0, grid_x - adj); i <= ulx; i++) { + for (j = lly; j <= uly; j++) { + for (pgd = grid_[i][j]; pgd != 0; pgd = pgd->next()) { + if (mn->address() == pgd->address()) +diff -urN ns-2.27.orig/mobile/gridkeeper.h ns-2.27/mobile/gridkeeper.h +--- ns-2.27.orig/mobile/gridkeeper.h 2004-01-12 19:59:06.000000000 -0500 ++++ ns-2.27/mobile/gridkeeper.h 2005-01-22 21:41:36.583975656 -0500 +@@ -13,8 +13,8 @@ + + #include "mobilenode.h" + +-#define min(a,b) (((a)>(b))?(b):(a)) +-#define max(a,b) (((a)<(b))?(b):(a)) ++#define MIN(a,b) (((a)>(b))?(b):(a)) ++#define MAX(a,b) (((a)<(b))?(b):(a)) + #define aligngrid(a,b) (((a)==(b))?((b)-1):((a))) + + +diff -urN ns-2.27.orig/sctp/sctp.cc ns-2.27/sctp/sctp.cc +--- ns-2.27.orig/sctp/sctp.cc 2004-01-12 19:57:35.000000000 -0500 ++++ ns-2.27/sctp/sctp.cc 2005-01-22 21:41:36.603972616 -0500 +@@ -151,7 +151,7 @@ + Packet::free(spDest->opRoutingAssistPacket); + spDest->opRoutingAssistPacket = NULL; + delete (SctpDest_S *) spCurrNode->vpData; //spDest +- (SctpDest_S *) spCurrNode->vpData = NULL; ++ spCurrNode->vpData = NULL; + } + + if(spSctpTrace != NULL) +diff -urN ns-2.27.orig/webcache/webtraf.cc ns-2.27/webcache/webtraf.cc +--- ns-2.27.orig/webcache/webtraf.cc 2004-01-12 19:53:52.000000000 -0500 ++++ ns-2.27/webcache/webtraf.cc 2005-01-22 21:41:36.604972464 -0500 +@@ -412,8 +412,11 @@ + nServer_ = atoi(argv[2]); + if (server_ != NULL) + delete []server_; +- server_ = new WebServer[nServer_](this); +- ++ server_ = (WebServer*) malloc(nServer_ * sizeof(WebServer)); ++ WebServer tmp(this); ++ for (int i = 0; i < nServer_; i++) { ++ memcpy(&server_[i], &tmp, sizeof(WebServer)); ++ } + return (TCL_OK); + } else if (strcmp(argv[1], "set-num-client") == 0) { + nClient_ = atoi(argv[2]); diff --git a/net-analyzer/ns/ns-2.27-r1.ebuild b/net-analyzer/ns/ns-2.27-r1.ebuild index 1e6da80a9f24..1b1ce3247d6c 100644 --- a/net-analyzer/ns/ns-2.27-r1.ebuild +++ b/net-analyzer/ns/ns-2.27-r1.ebuild @@ -1,6 +1,8 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ns/ns-2.27-r1.ebuild,v 1.5 2004/06/24 22:13:45 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ns/ns-2.27-r1.ebuild,v 1.6 2005/01/23 10:32:06 ka0ttic Exp $ + +inherit eutils DESCRIPTION="Network Simulator" HOMEPAGE="http://www.isi.edu/nsnam/ns/" @@ -20,6 +22,12 @@ DEPEND_COMMON=">=dev-lang/tcl-8.4.4 DEPEND="doc? ( virtual/tetex virtual/ghostscript dev-tex/latex2html ) ${DEPEND_COMMON}" RDEPEND="${DEPEND_COMMON}" +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-gentoo.diff +} + src_compile() { local myconf local mytclver="" |