Hello,
At 20:02 -0400 on 2014-4-17 Stefan Bruda wrote:
>
> ddd fails as follows:
>
> g++ -DHAVE_CONFIG_H -I. -I./.. -isystem /usr/X11R6/include -I/sw/include
> -O2 -g -Wall -W -Wwrite-strings -mminimal-toc -trigraphs -c -o ddd.o ddd.C
> ./strclass.h:813:19: error: friend declaration specifying a default argument
> must be a definition
> friend string common_prefix(const string& x, const string& y,
> ^
> ./strclass.h:815:19: error: friend declaration specifying a default argument
> must be a definition
> friend string common_suffix(const string& x, const string& y,
> ^
> ./strclass.h:866:16: error: friend declaration specifying a default argument
> must be a definition
> friend int readline(std::istream& s, string& x,
The following trivial patch for ddd-3.3.12/ddd/strclass.h fixes the
build process. The resulting ddd appears to run as expected (though I
only tested it on a single program).
------ begin patch for ddd-3.3.12/ddd/strclass.h ------
diff -ru ddd-3.3.12/ddd/strclass.h ddd-3.3.12-patched/ddd/strclass.C
--- ddd-3.3.12/ddd/strclass.h 2014-04-26 13:11:06.000000000 -0400
+++ ddd-3.3.12-patched/ddd/strclass.h 2014-04-26 13:35:52.000000000 -0400
@@ -543,6 +543,9 @@
bool OK() const;
};
+int readline(std::istream& s, string& x, char terminator = '\n', int
discard_terminator = 1);
+string common_prefix(const string& x, const string& y, int startpos = 0);
+string common_suffix(const string& x, const string& y, int startpos = -1);
class string
{
@@ -811,9 +814,9 @@
const regex& sep);
friend string common_prefix(const string& x, const string& y,
- int startpos = 0);
+ int startpos);
friend string common_suffix(const string& x, const string& y,
- int startpos = -1);
+ int startpos);
friend string replicate(char c, int n);
friend string replicate(const string& y, int n);
friend string join(const string *src, int n, const string& sep);
@@ -864,8 +867,8 @@
friend std::istream& operator>>(std::istream& s, string& x);
friend int readline(std::istream& s, string& x,
- char terminator = '\n',
- int discard_terminator = 1);
+ char terminator,
+ int discard_terminator);
// Status
unsigned int length() const;
------ end patch for ddd-3.3.12/ddd/strclass.h ------
For ease of copy and paste here is the resulting, complete ddd.patch
(which is the old one with the above appended) as well as a patch for
ddd.info:
------ begin ddd.info.patch ------
diff -Pur ddd.info.orig ddd.info
--- ddd.info.orig 2014-04-26 14:44:49.000000000 -0400
+++ ddd.info 2014-04-26 14:45:06.000000000 -0400
@@ -1,6 +1,6 @@
Package: ddd
Version: 3.3.12
-Revision: 3
+Revision: 4
GCC: 4.0
Maintainer: Remko Scharroo <[email protected]>
BuildDepends: fink (>= 0.24.12-1), lesstif, libncurses5 (>= 5.4-20041023-1006)
@@ -8,7 +8,7 @@
Source: mirror:gnu:%n/%n-%v.tar.gz
Source-MD5: c50396db7bac3862a6d2555b3b22c34e
PatchFile: %n.patch
-PatchFile-MD5: 6b443dce9aa6b17f20ff8fe421e34c09
+PatchFile-MD5: af5098dc09a59b39277d8487092fea4a
ConfigureParams: <<
--mandir=%p/share/man \
--infodir=%p/share/info \
------ end ddd.info.patch ------
------ begin ddd.patch ------
diff -ru ddd-3.3.12/configure ddd-3.3.12-patched/configure
--- ddd-3.3.12/configure 2009-02-11 18:25:52.000000000 +0100
+++ ddd-3.3.12-patched/configure 2009-10-22 23:44:00.000000000 +0200
@@ -4275,7 +4275,7 @@
rm -f conftest$ac_cv_exeext
{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6; }
-
+ac_cv_exeext=".exe"
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
diff -ru ddd-3.3.12/ddd/Makefile.in ddd-3.3.12-patched/ddd/Makefile.in
--- ddd-3.3.12/ddd/Makefile.in 2009-02-11 18:25:55.000000000 +0100
+++ ddd-3.3.12-patched/ddd/Makefile.in 2009-10-22 23:41:51.000000000 +0200
@@ -2693,7 +2693,7 @@
$(srcdir)/ddd.info.txt.gz.C: $(srcdir)/ddd.info.txt.gz
$(MAKE) stringify$(EXEEXT)
- -./stringify < $? > $@~ && $(MV) $@~ $@
+ -./stringify$(EXEEXT) < $? > $@~ && $(MV) $@~ $@
# License.
$(srcdir)/COPYING.gz: $(srcdir)/../COPYING
@@ -2701,7 +2701,7 @@
$(srcdir)/COPYING.gz.C: $(srcdir)/COPYING.gz
$(MAKE) stringify$(EXEEXT)
- -./stringify < $? > $@~ && $(MV) $@~ $@
+ -./stringify$(EXEEXT) < $? > $@~ && $(MV) $@~ $@
# News.
$(srcdir)/NEWS.gz: $(srcdir)/../NEWS
@@ -2709,7 +2709,7 @@
$(srcdir)/NEWS.gz.C: $(srcdir)/NEWS.gz
$(MAKE) stringify$(EXEEXT)
- -./stringify < $? > $@~ && $(MV) $@~ $@
+ -./stringify$(EXEEXT) < $? > $@~ && $(MV) $@~ $@
show.$(OBJEXT): COPYING.gz.C NEWS.gz.C ddd.info.txt.gz.C
diff -ru ddd-3.3.12/ddd/VSLDefList.C ddd-3.3.12-patched/ddd/VSLDefList.C
--- ddd-3.3.12/ddd/VSLDefList.C 2009-02-11 18:25:07.000000000 +0100
+++ ddd-3.3.12-patched/ddd/VSLDefList.C 2013-12-07 22:30:31.000000000 +0100
@@ -60,7 +60,7 @@
{
std::ostringstream s;
s << *arg;
- VSLLib::eval_error("no suiting definition for " + f_name() + s);
+ VSLLib::eval_error("no suiting definition for " + f_name() +
s.str().c_str());
}
return d ? d->eval(arg) : 0;
diff -ru ddd-3.3.12/ddd/strclass.h ddd-3.3.12-patched/ddd/strclass.C
--- ddd-3.3.12/ddd/strclass.h 2014-04-26 13:11:06.000000000 -0400
+++ ddd-3.3.12-patched/ddd/strclass.h 2014-04-26 13:35:52.000000000 -0400
@@ -543,6 +543,9 @@
bool OK() const;
};
+int readline(std::istream& s, string& x, char terminator = '\n', int
discard_terminator = 1);
+string common_prefix(const string& x, const string& y, int startpos = 0);
+string common_suffix(const string& x, const string& y, int startpos = -1);
class string
{
@@ -811,9 +814,9 @@
const regex& sep);
friend string common_prefix(const string& x, const string& y,
- int startpos = 0);
+ int startpos);
friend string common_suffix(const string& x, const string& y,
- int startpos = -1);
+ int startpos);
friend string replicate(char c, int n);
friend string replicate(const string& y, int n);
friend string join(const string *src, int n, const string& sep);
@@ -864,8 +867,8 @@
friend std::istream& operator>>(std::istream& s, string& x);
friend int readline(std::istream& s, string& x,
- char terminator = '\n',
- int discard_terminator = 1);
+ char terminator,
+ int discard_terminator);
// Status
unsigned int length() const;
------ end ddd.patch ------
Best regards,
Stefan
--
If it was so, it might be; and if it were so, it would be; but as it
isn't, it ain't. That's logic. --Lewis Carroll, Through the Looking-Glass
No HTML emails and proprietary attachments please <http://bruda.ca/ascii>
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users