Dash:
[t2.git] / package / scientific / orsa / hotfix-gcc43.patch
blob761685cd90b0ad17fd4a9f52692cddcb13a9bf65
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../orsa/gcc43.patch
5 # Copyright (C) 2009 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 diff -Naur orsa-0.7.0/src/liborsa/orsa_coord.cc orsa-0.7.0.new/src/liborsa/orsa_coord.cc
18 --- orsa-0.7.0/src/liborsa/orsa_coord.cc 2004-09-21 15:44:20.000000000 -0400
19 +++ orsa-0.7.0.new/src/liborsa/orsa_coord.cc 2008-06-11 06:40:39.000000000 -0400
20 @@ -26,6 +26,7 @@
22 #include <cmath>
23 #include <iostream>
24 +#include <cstdlib>
26 using namespace std;
28 diff -Naur orsa-0.7.0/src/liborsa/orsa_file.cc orsa-0.7.0.new/src/liborsa/orsa_file.cc
29 --- orsa-0.7.0/src/liborsa/orsa_file.cc 2005-01-10 20:01:11.000000000 -0500
30 +++ orsa-0.7.0.new/src/liborsa/orsa_file.cc 2008-06-11 06:44:22.000000000 -0400
31 @@ -27,6 +27,8 @@
32 #include <iostream>
34 #include <ctype.h>
35 +#include <cstring>
36 +#include <algorithm>
38 #include "orsa_common.h"
39 #include "orsa_units.h"
40 @@ -1126,7 +1128,7 @@
42 Vector LocationFile::ObsPos(const string obscode, const Date &date) {
44 - std::list<std::string>::iterator it_find = find(codes.begin(),codes.end(),obscode);
45 + std::list<std::string>::iterator it_find = std::find(codes.begin(),codes.end(),obscode);
46 if (it_find == codes.end()) {
47 ORSA_ERROR("obscode %s not found in file %s",obscode.c_str(),GetFileName().c_str());
48 return Vector();
49 diff -Naur orsa-0.7.0/src/liborsa/orsa_file_jpl.cc orsa-0.7.0.new/src/liborsa/orsa_file_jpl.cc
50 --- orsa-0.7.0/src/liborsa/orsa_file_jpl.cc 2005-01-04 21:25:06.000000000 -0500
51 +++ orsa-0.7.0.new/src/liborsa/orsa_file_jpl.cc 2008-06-11 06:44:35.000000000 -0400
52 @@ -27,6 +27,7 @@
53 #include "orsa_secure_math.h"
55 #include <cstdio>
56 +#include <cstring>
58 #include "sdncal.h"
59 #include "jpleph.h"
60 diff -Naur orsa-0.7.0/src/liborsa/orsa_interaction.cc orsa-0.7.0.new/src/liborsa/orsa_interaction.cc
61 --- orsa-0.7.0/src/liborsa/orsa_interaction.cc 2005-01-04 17:31:25.000000000 -0500
62 +++ orsa-0.7.0.new/src/liborsa/orsa_interaction.cc 2008-06-11 06:41:24.000000000 -0400
63 @@ -28,6 +28,7 @@
64 #include "orsa_error.h"
66 #include <cmath>
67 +#include <cstring>
68 #include <iostream>
70 using namespace std;
71 diff -Naur orsa-0.7.0/src/liborsa/orsa_interaction_tree.cc orsa-0.7.0.new/src/liborsa/orsa_interaction_tree.cc
72 --- orsa-0.7.0/src/liborsa/orsa_interaction_tree.cc 2004-10-01 20:04:30.000000000 -0400
73 +++ orsa-0.7.0.new/src/liborsa/orsa_interaction_tree.cc 2008-06-11 06:41:42.000000000 -0400
74 @@ -27,6 +27,7 @@
75 #include "orsa_universe.h"
77 #include <iostream>
78 +#include <cstring>
79 #include <list>
80 #include <stack>
81 #include <map>
82 diff -Naur orsa-0.7.0/src/liborsa/orsa_units.h orsa-0.7.0.new/src/liborsa/orsa_units.h
83 --- orsa-0.7.0/src/liborsa/orsa_units.h 2005-01-04 22:54:27.000000000 -0500
84 +++ orsa-0.7.0.new/src/liborsa/orsa_units.h 2008-06-11 06:37:55.000000000 -0400
85 @@ -28,6 +28,7 @@
86 #include <cmath>
87 #include <string>
88 #include <cstdio>
89 +#include <cstdlib>
91 #include "orsa_secure_math.h"
92 #include "orsa_coord.h"
93 @@ -181,7 +182,7 @@
94 inline static double __int_pow__(const double x, const int p) {
95 if (p == 0) return 1.0;
96 double _pow = x;
97 - const unsigned int max_k = static_cast<unsigned int>(std::abs(p));
98 + const unsigned int max_k = static_cast<unsigned int>(abs(p));
99 for (unsigned int k=1; k < max_k; ++k) {
100 _pow *= x;
102 diff -Naur orsa-0.7.0/src/libxorsa/xorsa_plot_area.h orsa-0.7.0.new/src/libxorsa/xorsa_plot_area.h
103 --- orsa-0.7.0/src/libxorsa/xorsa_plot_area.h 2005-01-04 21:25:06.000000000 -0500
104 +++ orsa-0.7.0.new/src/libxorsa/xorsa_plot_area.h 2008-06-11 06:47:20.000000000 -0400
105 @@ -57,7 +57,13 @@
109 +#ifdef __cplusplus
110 +extern "C" {
111 +#endif
112 extern char *MonthNameShort[13]; // sdncal.h
113 +#ifdef __cplusplus
115 +#endif
117 void FineDate(QString & label, const orsa::UniverseTypeAwareTime & t, bool=true);
118 void FineDate_HMS(QString & label, const orsa::UniverseTypeAwareTime & t);