Gentoo Archives: gentoo-commits

From: "Michael Januszewski (spock)" <spock@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/xmds/files: xmds-1.6.5-gcc43.patch
Date: Sun, 29 Jun 2008 08:59:44
Message-Id: E1KCsl1-0004iW-A5@stork.gentoo.org
1 spock 08/06/29 08:59:39
2
3 Added: xmds-1.6.5-gcc43.patch
4 Log:
5 Fix bug #229691.
6 (Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc8 x86_64)
7
8 Revision Changes Path
9 1.1 sci-mathematics/xmds/files/xmds-1.6.5-gcc43.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/xmds/files/xmds-1.6.5-gcc43.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/xmds/files/xmds-1.6.5-gcc43.patch?rev=1.1&content-type=text/plain
13
14 Index: xmds-1.6.5-gcc43.patch
15 ===================================================================
16 diff -Naurp xmds-1.6.5-orig/source/xmds_integrate_ark45.cc xmds-1.6.5/source/xmds_integrate_ark45.cc
17 --- xmds-1.6.5-orig/source/xmds_integrate_ark45.cc 2008-06-28 21:48:21.000000000 +0200
18 +++ xmds-1.6.5/source/xmds_integrate_ark45.cc 2008-06-28 21:48:57.000000000 +0200
19 @@ -35,6 +35,7 @@
20 #include <xmds_simulation.h>
21 #include <xmds_vector.h>
22 #include <cstdlib>
23 +#include <cstring>
24
25 // **************************************************************************
26 // **************************************************************************
27 @@ -289,7 +290,7 @@ void xmdsIntegrateARK45::writeTimestepEr
28 fprintf(outfile, "for(unsigned long _i0=0; _i0<_%s_size; _i0++){\n", fieldName);
29 }
30 fprintf(outfile, " for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
31 - if (strcmp(typeName, "complex") == 0) {
32 + if (std::strcmp(typeName, "complex") == 0) {
33 fprintf(outfile, " _temp_mod=mod2(_%s_main[_%s_main_index_pointer + _i1]);\n", fieldName, fieldName);
34 }
35 else {
36 @@ -347,7 +348,7 @@ void xmdsIntegrateARK45::writeTimestepEr
37 }
38 fprintf(outfile, " for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++)\n", fieldName);
39
40 - if (strcmp(typeName, "complex") == 0) {
41 + if (std::strcmp(typeName, "complex") == 0) {
42 fprintf(outfile, " if(mod2(_%s_main[_%s_main_index_pointer + _i1])>_peak[_i1]){\n", fieldName, fieldName);
43 fprintf(outfile, " _temp_error=mod(_%s_main[_%s_main_index_pointer + _i1]-_checkfield[_%s_main_index_pointer + _i1])/(mod(_%s_main[_%s_main_index_pointer + _i1])+1e-20);\n", fieldName, fieldName, fieldName, fieldName, fieldName);
44 }
45 @@ -364,7 +365,7 @@ void xmdsIntegrateARK45::writeTimestepEr
46 else{ // if ndims==0
47 fprintf(outfile, " for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
48
49 - if (strcmp(typeName, "complex") == 0) {
50 + if (std::strcmp(typeName, "complex") == 0) {
51 fprintf(outfile, " _temp_error=mod(_%s_main[_i1]-_checkfield[_i1])/(mod(_%s_main[_i1])+1e-20);\n", fieldName, fieldName);
52 }
53 else{
54 diff -Naurp xmds-1.6.5-orig/source/xmds_integrate_ark89.cc xmds-1.6.5/source/xmds_integrate_ark89.cc
55 --- xmds-1.6.5-orig/source/xmds_integrate_ark89.cc 2008-06-28 21:48:21.000000000 +0200
56 +++ xmds-1.6.5/source/xmds_integrate_ark89.cc 2008-06-28 21:48:57.000000000 +0200
57 @@ -35,6 +35,7 @@
58 #include <xmds_simulation.h>
59 #include <xmds_vector.h>
60 #include <cstdlib>
61 +#include <cstring>
62
63 // **************************************************************************
64 // **************************************************************************
65 @@ -284,7 +285,7 @@ void xmdsIntegrateARK89::writeTimestepEr
66 fprintf(outfile, "for (unsigned long _i0=0; _i0<_%s_size; _i0++){\n", fieldName);
67 }
68 fprintf(outfile, " for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
69 - if (strcmp(typeName, "complex") == 0) {
70 + if (std::strcmp(typeName, "complex") == 0) {
71 fprintf(outfile, " _temp_mod=mod2(_%s_main[_%s_main_index_pointer + _i1]);\n", fieldName, fieldName);
72 }
73 else {
74 @@ -334,7 +335,7 @@ void xmdsIntegrateARK89::writeTimestepEr
75 }
76 fprintf(outfile, " for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++)\n", fieldName);
77
78 - if (strcmp(typeName, "complex") == 0) {
79 + if (std::strcmp(typeName, "complex") == 0) {
80 fprintf(outfile, " if (mod2(_%s_main[_%s_main_index_pointer + _i1])>_peak[_i1]){\n", fieldName, fieldName);
81 fprintf(outfile, " _temp_error=mod(_%s_main[_%s_main_index_pointer + _i1]-_checkfield[_%s_main_index_pointer + _i1])/(mod(_%s_main[_%s_main_index_pointer + _i1])+1e-20);\n", fieldName, fieldName, fieldName, fieldName, fieldName);
82 }
83 @@ -352,7 +353,7 @@ void xmdsIntegrateARK89::writeTimestepEr
84
85 fprintf(outfile, " for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
86
87 - if (strcmp(typeName, "complex") == 0){
88 + if (std::strcmp(typeName, "complex") == 0){
89 fprintf(outfile, " _temp_error=mod(_%s_main[_i1]-_checkfield[_i1])/(mod(_%s_main[_i1])+1e-20);\n", fieldName, fieldName);
90 }
91 else{
92 diff -Naurp xmds-1.6.5-orig/source/xmds_simulation.h xmds-1.6.5/source/xmds_simulation.h
93 --- xmds-1.6.5-orig/source/xmds_simulation.h 2008-06-28 21:48:21.000000000 +0200
94 +++ xmds-1.6.5/source/xmds_simulation.h 2008-06-28 21:48:57.000000000 +0200
95 @@ -40,6 +40,8 @@
96 #include <xmds_sequence.h>
97 #include <xmds_globals.h>
98
99 +#include <string>
100 +
101 // *****************************************************************************
102 // *****************************************************************************
103 // xmdsSimulation
104 diff -Naurp xmds-1.6.5-orig/source/xsil2graphics.cc xmds-1.6.5/source/xsil2graphics.cc
105 --- xmds-1.6.5-orig/source/xsil2graphics.cc 2008-06-28 21:48:21.000000000 +0200
106 +++ xmds-1.6.5/source/xsil2graphics.cc 2008-06-28 21:48:57.000000000 +0200
107 @@ -40,6 +40,7 @@
108 #include <xsil_field.h>
109 #include <getopt_xmds.h>
110 #include <iostream>
111 +#include <cstring>
112
113 // **********************************************************************
114
115 @@ -306,7 +307,7 @@ int main(
116
117 const DOMString *mgName = nextElement->getAttribute("Name");
118 int mgNumber = i+1;
119 - if (strcmp("breakpoint", mgName->c_str()) == 0) {
120 + if (std::strcmp("breakpoint", mgName->c_str()) == 0) {
121 mgNumber = 1;
122 }
123 else {
124
125
126
127 --
128 gentoo-commits@l.g.o mailing list