bug 245: build failure with gcc 4.3.x

This commit is contained in:
Mathieu Lacage
2008-07-02 03:16:36 -07:00
parent 67c5dfa611
commit b93a9aeef4
22 changed files with 45 additions and 7 deletions

View File

@@ -536,6 +536,7 @@ private:
#ifdef BUFFER_USE_INLINE
#include "ns3/assert.h"
#include <string.h>
namespace ns3 {

View File

@@ -29,7 +29,10 @@ DoParse (const std::string s, uint64_t *v)
std::string::size_type n = s.find_first_not_of("0123456789.");
if (n != std::string::npos)
{ // Found non-numeric
double r = ::atof(s.substr(0, n).c_str());
std::istringstream iss;
iss.str (s.substr(0, n));
double r;
iss >> r;
std::string trailer = s.substr(n, std::string::npos);
if (trailer == "bps")
{
@@ -117,7 +120,9 @@ DoParse (const std::string s, uint64_t *v)
}
return true;
}
*v = ::atoll(s.c_str());
std::istringstream iss;
iss.str (s);
iss >> *v;
return true;
}

View File

@@ -20,6 +20,7 @@
#include "tag-list.h"
#include "ns3/log.h"
#include <vector>
#include <string.h>
NS_LOG_COMPONENT_DEFINE ("TagList");