Created
April 14, 2016 14:46
-
-
Save codestation/dd2cb368b7d415297ee48edcad9acd21 to your computer and use it in GitHub Desktop.
apply patch and compile with "make desine"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Algorithm/AlgorithmFactory.cpp b/src/Algorithm/AlgorithmFactory.cpp | |
index fd0ff3d..77623dd 100644 | |
--- a/src/Algorithm/AlgorithmFactory.cpp | |
+++ b/src/Algorithm/AlgorithmFactory.cpp | |
@@ -26,6 +26,7 @@ | |
#include "IO/Tag.h" | |
#include "Utils/TraceManager.h" | |
+#include <cstdlib> | |
// Constanst(s) | |
diff --git a/src/Algorithm/NewMIRAAlgorithm.cpp b/src/Algorithm/NewMIRAAlgorithm.cpp | |
index 3b38b23..20ca6cf 100644 | |
--- a/src/Algorithm/NewMIRAAlgorithm.cpp | |
+++ b/src/Algorithm/NewMIRAAlgorithm.cpp | |
@@ -26,6 +26,8 @@ | |
#include "Utils/Utils.h" | |
#include "prf/types_pr.h" | |
#include <cmath> | |
+#include <cstdio> | |
+#include <cstdlib> | |
#include <cstring> | |
using Types::IntVector; | |
diff --git a/src/Algorithm/SamcraAfterAlgorithm.cpp b/src/Algorithm/SamcraAfterAlgorithm.cpp | |
index 5abdc21..ede8b57 100644 | |
--- a/src/Algorithm/SamcraAfterAlgorithm.cpp | |
+++ b/src/Algorithm/SamcraAfterAlgorithm.cpp | |
@@ -23,6 +23,7 @@ | |
#include "Utils/TraceManager.h" | |
#include "Utils/Utils.h" | |
+#include <cstdlib> | |
extern "C" void samcrapath(int,int,int **,int *,double ***, | |
int,double *,int,int *,int *,int *,int *); | |
diff --git a/src/Algorithm/SamcraBAlgorithm.cpp b/src/Algorithm/SamcraBAlgorithm.cpp | |
index 1d8464f..a737b9d 100644 | |
--- a/src/Algorithm/SamcraBAlgorithm.cpp | |
+++ b/src/Algorithm/SamcraBAlgorithm.cpp | |
@@ -19,11 +19,11 @@ | |
#include "Network/LinkList.h" | |
#include "Network/Path.h" | |
#include "Network/Topology.h" | |
-#include "Utils/TString.h" | |
#include "Utils/Timer.h" | |
#include "Utils/TraceManager.h" | |
#include "Utils/Utils.h" | |
+#include <cstdlib> | |
extern "C" void samcra2path(int,int,int **,int *,double ***, | |
int,double *,int,int *,int *,int *,int *); | |
diff --git a/src/Algorithm/SamcraBAlgorithm.h b/src/Algorithm/SamcraBAlgorithm.h | |
index 932aa07..467c33a 100644 | |
--- a/src/Algorithm/SamcraBAlgorithm.h | |
+++ b/src/Algorithm/SamcraBAlgorithm.h | |
@@ -19,7 +19,6 @@ | |
#include "Algorithm/Algorithm.h" | |
#include "Network/Flow.h" | |
#include "Network/Path.h" | |
-#include "Utils/TString.h" | |
diff --git a/src/Algorithm/SamcraBeforeAlgorithm.cpp b/src/Algorithm/SamcraBeforeAlgorithm.cpp | |
index 8032f45..0dc5015 100644 | |
--- a/src/Algorithm/SamcraBeforeAlgorithm.cpp | |
+++ b/src/Algorithm/SamcraBeforeAlgorithm.cpp | |
@@ -23,6 +23,7 @@ | |
#include "Utils/TraceManager.h" | |
#include "Utils/Utils.h" | |
+#include <cstdlib> | |
extern "C" void samcrapath(int,int,int **,int *,double ***, | |
int,double *,int,int *,int *,int *,int *); | |
diff --git a/src/Algorithm/TEDBAlgorithm.cpp b/src/Algorithm/TEDBAlgorithm.cpp | |
index 38a61d3..13af26b 100644 | |
--- a/src/Algorithm/TEDBAlgorithm.cpp | |
+++ b/src/Algorithm/TEDBAlgorithm.cpp | |
@@ -23,7 +23,7 @@ | |
#include "Utils/TraceManager.h" | |
#include "Utils/Utils.h" | |
- | |
+#include <cstdlib> | |
extern "C" void tamcrapath(int,int,int **,int *,double ***,int,double *, | |
int,int,int **,int *,int *,int *); | |
diff --git a/src/IO/FileReader.cpp b/src/IO/FileReader.cpp | |
index 42b135e..98d0b8f 100644 | |
--- a/src/IO/FileReader.cpp | |
+++ b/src/IO/FileReader.cpp | |
@@ -17,6 +17,7 @@ | |
#include "IO/Tag.h" | |
#include "Utils/TraceManager.h" | |
#include "Utils/Utils.h" | |
+#include <cstdlib> | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
diff --git a/src/IO/IgorBinaryLog.cpp b/src/IO/IgorBinaryLog.cpp | |
index c0def1d..fec0378 100644 | |
--- a/src/IO/IgorBinaryLog.cpp | |
+++ b/src/IO/IgorBinaryLog.cpp | |
@@ -15,6 +15,7 @@ | |
#include <fstream> | |
#include <string> | |
#include <cmath> | |
+#include <typeinfo> | |
using std::endl; | |
using std::ofstream; | |
using std::string; | |
diff --git a/src/LinkStateUpdate/LinkStateUpdateVisitorFactory.cpp b/src/LinkStateUpdate/LinkStateUpdateVisitorFactory.cpp | |
index 35542a3..28fae64 100644 | |
--- a/src/LinkStateUpdate/LinkStateUpdateVisitorFactory.cpp | |
+++ b/src/LinkStateUpdate/LinkStateUpdateVisitorFactory.cpp | |
@@ -23,6 +23,7 @@ | |
#include "LinkStateUpdate/ClassHDTimerLSUpdateVisitor.h" | |
#include "LinkStateUpdate/ThresholdHDTimerLSUpdateVisitor.h" | |
#include "Utils/TraceManager.h" | |
+#include <cstdlib> | |
#include <string> | |
using std::string; | |
diff --git a/src/Main/Desine/DesineMain.cpp b/src/Main/Desine/DesineMain.cpp | |
index 7a7e079..8fe7109 100644 | |
--- a/src/Main/Desine/DesineMain.cpp | |
+++ b/src/Main/Desine/DesineMain.cpp | |
@@ -23,6 +23,8 @@ | |
#include "Utils/TraceManager.h" | |
#include "Utils/Types.h" | |
#include "Utils/Utils.h" | |
+#include <cstdlib> | |
+#include <cstring> | |
#include <new> | |
#include <fstream> | |
using std::set_new_handler; | |
diff --git a/src/Main/Desine/DesineModel.cpp b/src/Main/Desine/DesineModel.cpp | |
index 14cf8b8..2410c18 100644 | |
--- a/src/Main/Desine/DesineModel.cpp | |
+++ b/src/Main/Desine/DesineModel.cpp | |
@@ -30,6 +30,7 @@ | |
#include "Network/FlowManager.h" | |
#include "Network/Path.h" | |
#include "Network/Topology.h" | |
+#include "Network/TopologyFactory.h" | |
#include "Parameter/Parameters.h" | |
#include "Utils/Time.h" | |
#include "Utils/Types.h" | |
diff --git a/src/Network/Link.cpp b/src/Network/Link.cpp | |
index be76379..ca05473 100644 | |
--- a/src/Network/Link.cpp | |
+++ b/src/Network/Link.cpp | |
@@ -28,6 +28,8 @@ using Types::usi; | |
// Constanst(s) | |
+const double Link::METRIC_MIN = 1.0/DBL_MAX; // to prevent metric to be 0 | |
+const double Link::METRIC_MAX = DBL_MAX; | |
// Variable(s) | |
diff --git a/src/Network/Link.h b/src/Network/Link.h | |
index 0871496..8771a8d 100644 | |
--- a/src/Network/Link.h | |
+++ b/src/Network/Link.h | |
@@ -41,8 +41,8 @@ class Link : public AbstractNetworkElement | |
// Constanst(s) | |
public: | |
- static const double METRIC_MIN = 1.0/DBL_MAX; // to prevent metric to be 0 | |
- static const double METRIC_MAX = DBL_MAX; | |
+ static const double METRIC_MIN; | |
+ static const double METRIC_MAX; | |
// Variable(s) | |
private: | |
diff --git a/src/Network/Topology.h b/src/Network/Topology.h | |
index 75e3304..2ad869f 100644 | |
--- a/src/Network/Topology.h | |
+++ b/src/Network/Topology.h | |
@@ -22,7 +22,6 @@ | |
#include "Network/AbstractNetworkElementVisitor.h" | |
#include "Network/Link.h" | |
#include "Network/LinkList.h" | |
-#include "Network/TopologyFactory.h" | |
#include "RandomVariables/RandomVar.h" | |
#include "Utils/IllegalOperationException.h" | |
#include "Utils/TraceManager.h" | |
diff --git a/src/Network/TopologyFactory.cpp b/src/Network/TopologyFactory.cpp | |
index a5b75bf..28a89b6 100644 | |
--- a/src/Network/TopologyFactory.cpp | |
+++ b/src/Network/TopologyFactory.cpp | |
@@ -19,6 +19,7 @@ | |
#include <deque> | |
#include <set> | |
#include <string> | |
+#include <cstdlib> | |
#include <cmath> | |
using std::deque; | |
using std::string; | |
diff --git a/src/Parameter/Parameters.cpp b/src/Parameter/Parameters.cpp | |
index 9fbdd19..6bbc148 100644 | |
--- a/src/Parameter/Parameters.cpp | |
+++ b/src/Parameter/Parameters.cpp | |
@@ -22,6 +22,7 @@ | |
#include "RandomVariables/RandomVar.h" | |
#include "RandomVariables/UniformVar.h" | |
#include "Utils/Types.h" | |
+#include <cstdlib> | |
#include <iostream> | |
#include <string> | |
using std::cerr; | |
diff --git a/src/Parameter/ParamsReader.cpp b/src/Parameter/ParamsReader.cpp | |
index 0d1c64a..32b89ab 100644 | |
--- a/src/Parameter/ParamsReader.cpp | |
+++ b/src/Parameter/ParamsReader.cpp | |
@@ -17,6 +17,7 @@ | |
#include "IO/Tag.h" | |
#include "Parameter/ParamsReader.h" | |
#include "Utils/TraceManager.h" | |
+#include <cstdlib> | |
#include <string> | |
using std::string; | |
diff --git a/src/Utils/Utils.cpp b/src/Utils/Utils.cpp | |
index a79275a..d4f7bed 100644 | |
--- a/src/Utils/Utils.cpp | |
+++ b/src/Utils/Utils.cpp | |
@@ -15,6 +15,8 @@ | |
// Include(s) | |
#include "Utils/Utils.h" | |
#include <cmath> | |
+#include <cstdio> | |
+#include <cstdlib> | |
#include <ctime> | |
diff --git a/src/samcra/Fibonacci_mod.c b/src/samcra/Fibonacci_mod.c | |
index 8f93840..6c6026b 100644 | |
--- a/src/samcra/Fibonacci_mod.c | |
+++ b/src/samcra/Fibonacci_mod.c | |
@@ -59,6 +59,7 @@ void decrease_key(heap,x,k) | |
#include <string.h> | |
#include <stdio.h> | |
+#include <stdlib.h> | |
#include <math.h> | |
#include "samcra_util.h" | |
diff --git a/src/samcra/linked_list_mod.c b/src/samcra/linked_list_mod.c | |
index 967d705..b10b0d0 100644 | |
--- a/src/samcra/linked_list_mod.c | |
+++ b/src/samcra/linked_list_mod.c | |
@@ -2,6 +2,7 @@ | |
F.A. Kuipers 25/01/2000*/ | |
#include <stdio.h> | |
+#include <stdlib.h> | |
#include <math.h> | |
#include <string.h> | |
#include <assert.h> | |
diff --git a/src/samcra/samcra_util.c b/src/samcra/samcra_util.c | |
index 3851da9..6d15d25 100644 | |
--- a/src/samcra/samcra_util.c | |
+++ b/src/samcra/samcra_util.c | |
@@ -1,6 +1,8 @@ | |
#ifndef _NR_END | |
#define _NR_END 1 | |
+#include <stdlib.h> | |
+ | |
int *c_ivector(nl,nh) | |
long nh,nl; | |
/* allocate an int vector with subscript range v[nl..nh] */ | |
diff --git a/src/samcra/tamcra_mod.c b/src/samcra/tamcra_mod.c | |
index 88de0d0..00a2a3a 100644 | |
--- a/src/samcra/tamcra_mod.c | |
+++ b/src/samcra/tamcra_mod.c | |
@@ -7,6 +7,7 @@ F.A. Kuipers 18/02/2000 | |
#include <string.h> | |
#include <stdio.h> | |
+#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#include "samcra_util.h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment