Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 159951 Details for
Bug 227529
dev-lang/maude-2.3.0 fails to build with gcc 4.3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for compilation with gcc-4.3
maude-2.3-gcc-4.3.patch (text/plain), 2.26 KB, created by
Bert Karwatzki
on 2008-07-09 11:24:54 UTC
(
hide
)
Description:
Patch for compilation with gcc-4.3
Filename:
MIME Type:
Creator:
Bert Karwatzki
Created:
2008-07-09 11:24:54 UTC
Size:
2.26 KB
patch
obsolete
>diff -aur src.old/BuiltIn/stringOpSymbol.cc src/BuiltIn/stringOpSymbol.cc >--- src.old/BuiltIn/stringOpSymbol.cc 2008-07-08 19:43:23.000000000 +0200 >+++ src/BuiltIn/stringOpSymbol.cc 2008-07-09 13:02:19.000000000 +0200 >@@ -220,18 +220,7 @@ > case CODE('f', 'l'): > { > bool error; >- //double fl = stringToDouble(left.c_str(), error); >- // >- // This messing about is needed because Rope::c_str() >- // fails in libstdc++-v3 >- // >- int len = left.length(); >- char* t = new char[len + 1]; >- left.copy(t); >- t[len] = '\0'; >- double fl = stringToDouble(t, error); >- delete [] t; >- // >+ double fl = stringToDouble(left.c_str(), error); > if (error) > goto fail; > return floatSymbol->rewriteToFloat(subject, context, fl); >@@ -591,38 +580,28 @@ > if (!isalnum(subject[j])) > return false; > } >- char* t = new char[len]; // longer than needed but who cares > int dLen = len - (i + 1); >- subject.copy(i + 1, dLen, t); >- t[dLen] = '\0'; >- if (mpz_set_str(denominator.get_mpz_t(), t, base) != 0) >+ crope subject_subrope; >+ subject_subrope = subject.substr(i + 1, dLen); >+ if (mpz_set_str(denominator.get_mpz_t(), subject_subrope.c_str(), base) != 0) > { >- delete [] t; > return false; > } >- subject.copy(0, i, t); >- t[i] = '\0'; >- if (mpz_set_str(numerator.get_mpz_t(), t, base) != 0) >+ subject_subrope = subject.substr(0,i); >+ if (mpz_set_str(numerator.get_mpz_t(), subject_subrope.c_str(), base) != 0) > { >- delete [] t; > return false; > } >- delete [] t; > return true; > } > else > return false; > } > } >- char* t = new char[len + 1]; >- subject.copy(t); >- t[len] = '\0'; >- if (mpz_set_str(numerator.get_mpz_t(), t, base) == 0) >+ if (mpz_set_str(numerator.get_mpz_t(), subject.c_str(), base) == 0) > { >- delete [] t; > denominator = 0; > return true; > } >- delete [] t; > return false; > } >diff -aur src.old/Utility/macros.hh src/Utility/macros.hh >--- src.old/Utility/macros.hh 2008-07-08 19:43:23.000000000 +0200 >+++ src/Utility/macros.hh 2008-07-08 20:08:01.000000000 +0200 >@@ -66,6 +66,7 @@ > #include <iostream> > #include <fstream> > #include <algorithm> >+#include <cstring> > using namespace std; > > //
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 227529
:
159951
|
181507